Aap Posted June 9, 2017 Share Posted June 9, 2017 Not sure if i do something wrong. but when launching from CLI, i get this error. ror executing event : testscript.LoginEvent@1538993 java.lang.NullPointerException at org.osbot.rs07.api.Widgets.getWidgetContainingText(bk:854) at testscript.LoginEvent.getLobbyButton(LoginEvent.java:133) at testscript.LoginEvent.execute(LoginEvent.java:30) at org.osbot.rs07.event.EventExecutor$2.run(ni:267) at org.osbot.rs07.event.EventExecutor.execute(ni:281) at org.osbot.rs07.script.MethodProvider.execute(kf:637) at testscript.LoginTest.onStart(LoginTest.java:18) at org.osbot.rs07.event.ScriptExecutor.IiIiIiiiiIiI(ti:266) at org.osbot.rs07.event.ScriptExecutor.start(ti:211) at org.osbot.Zb.run(ro:13) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) when i just stop the same script and start it from osbot script manager, it works fine(account details pre-filled in the script) any idea of what i do wrong? Quote Link to comment Share on other sites More sharing options...
k9thebeast Posted June 9, 2017 Share Posted June 9, 2017 22 minutes ago, Aap said: Not sure if i do something wrong. but when launching from CLI, i get this error. ror executing event : testscript.LoginEvent@1538993 java.lang.NullPointerException at org.osbot.rs07.api.Widgets.getWidgetContainingText(bk:854) at testscript.LoginEvent.getLobbyButton(LoginEvent.java:133) at testscript.LoginEvent.execute(LoginEvent.java:30) at org.osbot.rs07.event.EventExecutor$2.run(ni:267) at org.osbot.rs07.event.EventExecutor.execute(ni:281) at org.osbot.rs07.script.MethodProvider.execute(kf:637) at testscript.LoginTest.onStart(LoginTest.java:18) at org.osbot.rs07.event.ScriptExecutor.IiIiIiiiiIiI(ti:266) at org.osbot.rs07.event.ScriptExecutor.start(ti:211) at org.osbot.Zb.run(ro:13) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) when i just stop the same script and start it from osbot script manager, it works fine(account details pre-filled in the script) any idea of what i do wrong? The client hasn't loaded before trying to log in. Simplest way to do this would be to add a 15 second sleep before trying to log in. There are better ways ofcourse.. 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted June 9, 2017 Author Share Posted June 9, 2017 11 hours ago, Aap said: Not sure if i do something wrong. but when launching from CLI, i get this error. ror executing event : testscript.LoginEvent@1538993 java.lang.NullPointerException at org.osbot.rs07.api.Widgets.getWidgetContainingText(bk:854) at testscript.LoginEvent.getLobbyButton(LoginEvent.java:133) at testscript.LoginEvent.execute(LoginEvent.java:30) at org.osbot.rs07.event.EventExecutor$2.run(ni:267) at org.osbot.rs07.event.EventExecutor.execute(ni:281) at org.osbot.rs07.script.MethodProvider.execute(kf:637) at testscript.LoginTest.onStart(LoginTest.java:18) at org.osbot.rs07.event.ScriptExecutor.IiIiIiiiiIiI(ti:266) at org.osbot.rs07.event.ScriptExecutor.start(ti:211) at org.osbot.Zb.run(ro:13) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) when i just stop the same script and start it from osbot script manager, it works fine(account details pre-filled in the script) any idea of what i do wrong? 10 hours ago, k9thebeast said: The client hasn't loaded before trying to log in. Simplest way to do this would be to add a 15 second sleep before trying to log in. There are better ways ofcourse.. You could try checking getBot().isLoaded() I will try it out myself tonight and update the snippet usage. I also have some additional account status checks I will be adding to the handler. 2 Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted June 9, 2017 Share Posted June 9, 2017 2 hours ago, Explv said: You could try checking getBot().isLoaded() I will try it out myself tonight and update the snippet usage. I also have some additional account status checks I will be adding to the handler. Hype, More spoonfeed 4 me 3 Quote Link to comment Share on other sites More sharing options...
Explv Posted June 9, 2017 Author Share Posted June 9, 2017 5 minutes ago, HeyImJamie said: Hype, More spoonfeed 4 me 1 Quote Link to comment Share on other sites More sharing options...
Phaibooty Posted June 9, 2017 Share Posted June 9, 2017 2 hours ago, Explv said: You could try checking getBot().isLoaded() I will try it out myself tonight and update the snippet usage. I also have some additional account status checks I will be adding to the handler. Oooo hook it up. Pls Quote Link to comment Share on other sites More sharing options...
k9thebeast Posted June 9, 2017 Share Posted June 9, 2017 (edited) @Explv No guarantee this works as I havent used it in a while, but found something in one of my older scripts. sleepUntil(20, () -> !client.getLoginStage().equals(null)); Edited June 9, 2017 by k9thebeast 1 Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 1, 2017 Share Posted September 1, 2017 On 6/9/2017 at 9:11 AM, Explv said: You could try checking getBot().isLoaded() I will try it out myself tonight and update the snippet usage. I also have some additional account status checks I will be adding to the handler. I see you never updated the original thread. I ran into the same issue today but I just added some code to fix it. Just letting you know incase you wanted to update OP :P Quote Link to comment Share on other sites More sharing options...
dreameo Posted September 7, 2017 Share Posted September 7, 2017 Had this small problem myself and found a fix. The event is blocking. The LoginResponseCodeListener is delayed because of this by a minute or so. set the loginEvent to async and it'll solve that problem. Quote Link to comment Share on other sites More sharing options...
Butters Posted September 8, 2017 Share Posted September 8, 2017 Anyone else have a problem that it not always logs back in after being logged out due inactivity or just before bans? Happens like 30% of the time. Pseudo usage: int onLoop() { if (client.isLoggedIn()) { doStuff(); else { execute(loginEvent); } } Just stays logged out. Pausing and resuming the script helps Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 13, 2017 Share Posted September 13, 2017 On 9/8/2017 at 3:32 AM, nosepicker said: Anyone else have a problem that it not always logs back in after being logged out due inactivity or just before bans? Happens like 30% of the time. Pseudo usage: int onLoop() { if (client.isLoggedIn()) { doStuff(); else { execute(loginEvent); } } Just stays logged out. Pausing and resuming the script helps Yeah was happening to me too on like 1/10 accounts, but it stopped now for some reason Quote Link to comment Share on other sites More sharing options...
Butters Posted September 14, 2017 Share Posted September 14, 2017 9 hours ago, Juggles said: Yeah was happening to me too on like 1/10 accounts, but it stopped now for some reason Still happening to me in 1.4.138. I think it has something to do with osbot threads. Seems like loginEvent doesn't always fire when it's logged out. Pausing and resuming the script helps. Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 22, 2017 Share Posted September 22, 2017 On 9/14/2017 at 2:35 AM, nosepicker said: Still happening to me in 1.4.138. I think it has something to do with osbot threads. Seems like loginEvent doesn't always fire when it's logged out. Pausing and resuming the script helps. Did you find a solution to this? It's happening to me again every once in a while. Quote Link to comment Share on other sites More sharing options...
Butters Posted September 22, 2017 Share Posted September 22, 2017 47 minutes ago, Juggles said: Did you find a solution to this? It's happening to me again every once in a while. not a 100% one but seems to work. Based on guesses mostly. If you get logged out while doing webwalking or some other activity that's basically a loop and requires being logged in, that activity doesn't really end. I've made sure that all these activities stop executing if the bot is logged out. Saw only 1 bot fail out of 100 so far. Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 23, 2017 Share Posted September 23, 2017 (edited) 21 hours ago, nosepicker said: not a 100% one but seems to work. Based on guesses mostly. If you get logged out while doing webwalking or some other activity that's basically a loop and requires being logged in, that activity doesn't really end. I've made sure that all these activities stop executing if the bot is logged out. Saw only 1 bot fail out of 100 so far. How do you stop executing activities? Like I've found some in the middle of fishing just randomly logged out. It should have switched to login event but rather just stayed in the fishing loop doing nothing. I thought these kinds of things would automatically stop. Edited September 23, 2017 by Juggles Quote Link to comment Share on other sites More sharing options...