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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the "context deadline exceeded" issue. #46

Merged
merged 2 commits into from
Dec 17, 2023

Conversation

gu-does-git
Copy link
Contributor

@gu-does-git gu-does-git commented Sep 12, 2023

This pull request addresses the "context deadline exceeded" issue that was occurring during the last step of the process. The issue could not be consistently reproduced, but I've included relevant logs to provide context.
The "context deadline exceeded" error was occurring intermittently during the last step of the process, causing the process to fail unpredictably.

Last leg of the logs:

2023/09/12 22:00:29 <- {"method":"Inspector.targetCrashed","params":{},"sessionId":"60C44BA185A07A201B26B4C4E0F6B7D4"}
2023/09/12 22:00:29 <- {"method":"Target.targetCrashed","params":{"targetId":"BBEA06D5C1B3F692E360CD296EB53F39","status":"crashed","errorCode":133}}
2023/09/12 22:00:29 <- {"method":"Target.targetCrashed","params":{"targetId":"BBEA06D5C1B3F692E360CD296EB53F39","status":"crashed","errorCode":133},"sessionId":"60C44BA185A07A201B26B4C4E0F6B7D4"}
could not find start building button: context deadline exceeded

I've identified a similar issue and solution from chromedp/chromedp#1170 and applied it. And now it seems to work fine! (I could only test it once, but I can try testing it multiple times and observing if it works every single time)
edit: I've been testing it for some days now and it has worked every single time 馃槈

Additional Notes:
I had to modify the Makefile so that I could build it locally in my machine (added the CGO_ENABLED=0 flag to the go build command).

@0x111
Copy link
Owner

0x111 commented Sep 18, 2023

Hey, thanks for the PR, I will check it this week, but at first glance should not cause any harm. I will get back to you.

Sorry for the delay.

@vdesabou
Copy link

@0x111 Hello ! The image is no more working for me and testing this PR, it fixes the issue for me as well.
Any chance you merge this PR ?

vdesabou added a commit to vdesabou/kafka-docker-playground that referenced this pull request Nov 27, 2023
@0x111
Copy link
Owner

0x111 commented Nov 27, 2023

Hi, did you also confirm this PR helps with an error? Because technically there is no functional or dramatic change. Thanks

@vdesabou
Copy link

vdesabou commented Nov 27, 2023

I executed

docker run -e USERNAME="$SERVICENOW_DEVELOPER_USERNAME" -e PASSWORD="$SERVICENOW_DEVELOPER_PASSWORD" ghcr.io/0x111/servicenow-instance-wakeup:latest

Then waited for 15 minutes at least, it dit not wake it up

Then I built my own image with this PR and ran it:

docker run -e USERNAME="$SERVICENOW_DEVELOPER_USERNAME" -e PASSWORD="$SERVICENOW_DEVELOPER_PASSWORD" vdesabou/servicenowinstancewakeup:latest

instead of

Setting cookies to pre-confirm cookie modal!
Cookies set!

I see now:

Setting cookies to pre-confirm cookie modal!
Cookies set!
Start building button found
Instance wakeup initiated successfully, your instance should be awake pretty soon!

And then a few minutes later the instance was no more hibernating

so to me it looks like it is not just cosmetic change ?

@0x111
Copy link
Owner

0x111 commented Nov 27, 2023

Thanks for your input I was asking because the original poster did later write that it did not work all the time. So thanks for this I will check it this week

@gu-does-git
Copy link
Contributor Author

Thanks for your input I was asking because the original poster did later write that it did not work all the time. So thanks for this I will check it this week

It works constantly now! With the changes that I did in this PR the instance always wakes up when running the container.

Fix the GLIBC errors due to the new OS version used by latest golang docker image.

Error message:
/app/servicenow-instance-wakeup: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /app/servicenow-instance-wakeup)
/app/servicenow-instance-wakeup: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /app/servicenow-instance-wakeup)
@0x111 0x111 self-requested a review December 17, 2023 12:40
Copy link
Owner

@0x111 0x111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, there was an issue with using the latest golang Docker image, with GLIBC, I modified the dockerfile to address this issue.

Now this looks fine to me, I will release a new version today.
Sorry for the long delay.

@0x111 0x111 merged commit f07357b into 0x111:master Dec 17, 2023
1 check passed
@0x111
Copy link
Owner

0x111 commented Dec 17, 2023

New docker version published on docker hub and github packages too.

Thanks for your help @gu-does-git @vdesabou! I appreciate it and I will try my best to react faster to future issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants