question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extern scripts being fired unreliably

See original GitHub issue

Description

hi guys I still have some issues with a script tag changing HTML in my gatsby template, I found that for some reason if the function is fired multiple time with setInterval then it works there (it used to work in the live repo too but now for some reason it stopped working as well)

Steps to reproduce

https://codesandbox.io/s/ancient-bash-88u2s as you can see if the setInterval is outcommented it will be shown wrong (placeholder image of some kind?) but if you remove the // then it works again as expected

Expected result

It should show a link with hover effect and other styles etc instead of an image

Actual result

it shows only an image and not a link, in the live version when I fire the script the quality of the image will be better but doesn’t turn into a link with text (expected result)

Environment

you can see the env in the reproduction for the live site:

  System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.15.0 - ~/.nvm/versions/node/v11.15.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.12.1 - ~/.nvm/versions/node/v11.15.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/local/bin/python
  Browsers:
    Chrome: 79.0.3945.79
    Safari: 13.0.4
  npmPackages:
    gatsby: 2.13.2 => 2.13.2 
    gatsby-awesome-pagination: ^0.3.4 => 0.3.4 
    gatsby-image: ^2.2.3 => 2.2.29 
    gatsby-plugin-create-client-paths: ^2.1.16 => 2.1.16 
    gatsby-plugin-feed: 2.3.2 => 2.3.2 
    gatsby-plugin-google-tagmanager: ^2.0.13 => 2.1.15 
    gatsby-plugin-hubspot: ^1.3.3 => 1.3.3 
    gatsby-plugin-lodash: ^3.0.5 => 3.1.13 
    gatsby-plugin-manifest: ^2.2.0 => 2.2.23 
    gatsby-plugin-offline: 2.2.9 => 2.2.9 
    gatsby-plugin-postcss: ^2.0.7 => 2.1.13 
    gatsby-plugin-purgecss: ^3.1.1 => 3.1.1 
    gatsby-plugin-react-helmet: ^3.0.12 => 3.1.13 
    gatsby-plugin-sass: ^2.0.11 => 2.1.20 
    gatsby-plugin-sharp: ^2.2.1 => 2.2.32 
    gatsby-source-filesystem: ^2.1.1 => 2.1.33 
    gatsby-source-wordpress: ^3.0.58 => 3.1.43 
    gatsby-transformer-sharp: ^2.2.0 => 2.2.23 
  npmGlobalPackages:
    gatsby-cli: 2.8.5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kepi0809commented, Apr 8, 2020

Hi @madalynrose, sorry being really busy lately.

First of all thanks for your answer, good to know that this issue isn’t lost in the ether 😄

I was having this issue with basically all external scripts that were supposed to create some kind of html in the DOM. I’ll look into the suggestions/guesses you were giving me, thank you!

0reactions
freiksenetcommented, Jul 3, 2020

Hello!

I’ll be closing this issue as there has been no activity for 2 months.

Thank you for using Gatsby! 💜

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is the callback on jQuery's getScript() unreliable or am I doing ...
Yeah, I've discovered too that getScript is unreliable in FireFox, firing the callback before the script has been downloaded and/or executed.
Read more >
Execution Order of Scripts - Awake and OnEnable - Unity Forum
I am facing issues related to scripts execution order and this point is out of my mind though I am an experienced, Unity...
Read more >
Need to call an external JavaScript file from a Content Page!!!!!!!!
Hi, I am trying to use a Javascript function which flips the images like the pages of a book. I need this feature...
Read more >
Window: unload event - Web APIs | MDN
The unload event is fired when the document or a child resource is being unloaded.
Read more >
BashPitfalls - Greg's Wiki
ls is just plain unnecessary. It's an external command whose output is intended specifically to be read by a human, not parsed by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found