June 9, 20178 yr 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?
June 9, 20178 yr 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..
June 9, 20178 yr Author 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.
June 9, 20178 yr 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
June 9, 20178 yr 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
June 9, 20178 yr @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, 20178 yr by k9thebeast
September 1, 20178 yr 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
September 7, 20178 yr 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.
September 8, 20178 yr 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
September 13, 20178 yr 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
September 14, 20178 yr 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.
September 22, 20178 yr 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.
September 22, 20178 yr 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.
September 23, 20178 yr 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, 20178 yr by Juggles
Create an account or sign in to comment