Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work anymore ? #36

Closed
vdesabou opened this issue Oct 28, 2021 · 9 comments · Fixed by #37
Closed

Does not work anymore ? #36

vdesabou opened this issue Oct 28, 2021 · 9 comments · Fixed by #37
Labels
bug Something isn't working

Comments

@vdesabou
Copy link

Thanks for that tool !

It seems that since around mid September, it is no more working, I get:

docker run -e USERNAME="$SERVICENOW_DEVELOPER_USERNAME" -e PASSWORD="$SERVICENOW_DEVELOPER_PASSWORD"  ruthless/servicenow-instance-wakeup:latest  
2021/10/28 07:46:50 Starting the app with debug=false/headless=true/account=xxxxx
Successfully set the viewport...
Navigating to the webpage: https://developer.servicenow.com/ssologin.do?relayState=%2Fdev.do%23%21%2Fhome
Successfully navigated to the webpage...
Searching for the .logo element...
Found .logo element
Filling out the username field...
Filled username field with xxxx
Clicking the next button...
Clicked Next button
Searching for the password field...
Found password field
Filling out the password field...
Filled password field with your password ******
Clicking the submit button...
Clicked Submit button
Login successful!
Detecting the wakeup button element to determine if we are on the developer portal homepage...


could not find shadow element (header status bar): context deadline exceeded

I understand that could not find shadow element (header status bar): context deadline exceeded is expected now and it was working even with that error before.

But my instance is not woken up (even after waiting for a while)

Any idea what might have changed ?

@0x111
Copy link
Owner

0x111 commented Nov 1, 2021

Hi, thanks for reporting, I hope I will be able to check this out this week.

There might be that they changed parts of their website. Will get back with an update soon.

@0x111 0x111 added the triage label Nov 1, 2021
0x111 added a commit that referenced this issue Nov 2, 2021
- Bump chromedp to 0.7.4 (dependency update)
@0x111 0x111 mentioned this issue Nov 2, 2021
@0x111
Copy link
Owner

0x111 commented Nov 2, 2021

@vdesabou I did create a PR #37
This should fix the issue mentioned here, please confirm. After that I will merge it if no objections. I also bumped the version of the chromedp :)

Thanks for the report, I must admit I did not used this app lately, thus I did not notice this problem with it.

@vdesabou
Copy link
Author

vdesabou commented Nov 3, 2021

@0x111 Thanks Richard for the quick PR !

unfortunately, it does not seem to resolve the problem in my case, see:

docker run -e USERNAME="$SERVICENOW_DEVELOPER_USERNAME" -e PASSWORD="$SERVICENOW_DEVELOPER_PASSWORD" servicenowinstancewakeup                  
Starting the app with debug=false/headless=true/[email protected]
Successfully set the viewport...
Navigating to the webpage: https://developer.servicenow.com/userlogin.do?relayState=https%3A%2F%2Fdeveloper.servicenow.com%2Fdev.do%23!%2Fhome%3Fwu%3Dtrue
Successfully navigated to the webpage...
Searching for the .logo element...
Found .logo element
Filling out the username field...
Filled username field with [email protected]
Clicking the next button...
Clicked Next button
Searching for the password field...
Found password field
Filling out the password field...
Filled password field with your password ******
Clicking the submit button...
Clicked Submit button
Login successful!
Detecting the wakeup button element to determine if we are on the developer portal homepage...
could not find shadow element (header status bar): context deadline exceeded

So it is using the new URL

After executing it, I wait 5 to 10 minutes and execute

curl -X POST "${SERVICENOW_URL}/api/now/table/incident" --user admin:"$SERVICENOW_PASSWORD" -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'cache-control: no-cache' -d '{"short_description": "This is test"}'

But it is still hibernating..

        <title>
            Instance Hibernating page
        </title>

Did it work on your side ?

@0x111
Copy link
Owner

0x111 commented Nov 3, 2021

I tried the binary version without headless mode, I will test the docker and/or headless too today.

For me in the binary form headless=false it did work though.

I will get back to you, once my instance goes to sleep again so I am able to test it.

@vdesabou
Copy link
Author

vdesabou commented Nov 3, 2021

Ok I will try with HEADLESS=falseonce my instance is hibernating again
Thanks

@0x111
Copy link
Owner

0x111 commented Nov 6, 2021

I tried just now with headless=true only with the binary no docker container. My instance seems to be reinstated. (desktop chrome on mac)

I will try the combo with the docker container.

@vdesabou
Copy link
Author

vdesabou commented Nov 8, 2021

@0x111 My bad, there was a typo in my password..I did not check it earlier because of the Login successful! log

I can confirm that your fix is working !
I hope it will be pushed to Docker Hub soon

Thanks a lot !

@0x111
Copy link
Owner

0x111 commented Nov 8, 2021

Great!

I agree, the detection could be definitely better, but I did not wanted to spend too much time on this part, since the purpose is to cut time for repetitive tasks.

Since there are no more blockers for merge, I will take this up hopefully today. Thanks for the feedback and I am glad the issue is fixed now.

Edit: About the docker stuff, I will have to move to github at some point, these new changes to the Free plan are making it not so useful anymore for simple stuff like this. But in any case, this one will go there still but for future releases there might be a change in this.

@0x111 0x111 closed this as completed in #37 Nov 8, 2021
0x111 added a commit that referenced this issue Nov 8, 2021
- Fix SSO login url (fixes #36)
- Bump chromedp to 0.7.4 (dependency update)
@0x111
Copy link
Owner

0x111 commented Nov 8, 2021

@vdesabou Docker image built and published. Please open a new issue in case of problems. Thanks for the help until now :)

@0x111 0x111 added bug Something isn't working and removed triage labels Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants