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

fix: Static service Wait for network idle #270

Merged
merged 1 commit into from
Jul 2, 2019
Merged

Conversation

Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented Jul 2, 2019

What is this?

I've been seeing a lot of errors like:

Error: Execution context was destroyed, most likely because of a navigation.

This happens because we try to start altering the page (by injecting our JS) before everything is settled down. This change won't promise the page has actually loaded (that's very hard to determine) but it will wait for most network requests to resolve before trying do anything.

I've been seeing a lot of errors like:

```
Error: Execution context was destroyed, most likely because of a navigation.
```

This happens because we try to start altering the page (by injecting our JS)
before everything is settled down. This change won't promise the page has
actually loaded (that's very hard to determine) but it will wait for most
network requests to resolve before trying do anything.
@Robdel12 Robdel12 requested a review from djones July 2, 2019 14:51
Copy link
Contributor

@djones djones left a comment

Choose a reason for hiding this comment

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

🍍 LGTM

@djones
Copy link
Contributor

djones commented Jul 2, 2019

If this still brings up troubles, we could use https://github.com/percy/percy-agent/blob/master/src/utils/wait-for-network-idle.ts next

@Robdel12
Copy link
Contributor Author

Robdel12 commented Jul 2, 2019

@djones OHH very nice, that would be a great next step

@Robdel12 Robdel12 merged commit 7d438d2 into master Jul 2, 2019
@delete-merged-branch delete-merged-branch bot deleted the rd/static-wait-network branch July 2, 2019 15:40
djones pushed a commit that referenced this pull request Jul 2, 2019
## [0.8.1](v0.8.0...v0.8.1) (2019-07-02)

### Bug Fixes

* Static service wait for network idle ([#270](#270)) ([7d438d2](7d438d2))
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.

2 participants