Skip to content

fix: Static service Wait for network idle#270

Merged
Robdel12 merged 1 commit intomasterfrom
rd/static-wait-network
Jul 2, 2019
Merged

fix: Static service Wait for network idle#270
Robdel12 merged 1 commit intomasterfrom
rd/static-wait-network

Conversation

@Robdel12
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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