ENDLESS LOOP - Error with createGadgetDevHarness

I've been on vacation for a couple of weeks and returned to a new error:
Uncaught (in promise) ReferenceError: process is not defined
at new nr (<anon>:9090:56)
at nr.createGadgetDevHarness (<anon>:9057:28)
at nl (<anon>:9628:45)
at <anon>:9639:19
Uncaught (in promise) ReferenceError: process is not defined
at new nr (<anon>:9090:56)
at nr.createGadgetDevHarness (<anon>:9057:28)
at nl (<anon>:9628:45)
at <anon>:9639:19
for a brief moment it the path shows (I got a screen shot) before it is replaced by <anon> :
https://assets.gadget.dev/assets/devHarness.min.js:sourcemap:1744:2304
https://assets.gadget.dev/assets/devHarness.min.js:sourcemap:1744:2304
I've been migrated to the new Next-Gen dev environment by shopify partners. and this appeared to have caused an issue with running my app, so I've worked through that including updating the gadget provide npm packages.
However this error is repeating and gets to 1.5m messages in Console before quitting. It happens as it is loading but before any of my actual app code is loaded. Note: I've use
shopify app dev
shopify app dev
in terminal instead of
yarn shopify:dev
yarn shopify:dev
as the latter won't work anymore. Gadget AI tried to help - used up 2 credits to give me the below wrong info that didn't help. Said that I needed to change in App.jsx:
location.pathname ===
new URL(process.env.GADGET_PUBLIC_SHOPIFY_APP_URL).pathname
location.pathname ===
new URL(process.env.GADGET_PUBLIC_SHOPIFY_APP_URL).pathname
to
location.pathname ===
new URL(import.meta.env.GADGET_PUBLIC_SHOPIFY_APP_URL).pathname
location.pathname ===
new URL(import.meta.env.GADGET_PUBLIC_SHOPIFY_APP_URL).pathname
still getting the error. does anyone have a clue what the issue might be & how to fix?
21 Replies
Chocci_Milk
Chocci_Milk4w ago
Hello, Could you please share the name of your application so that I can take a look? Have you bumped the React package to version 19 and updated Shopify's app bridge package? More information here: https://discord.com/channels/836317518595096598/1364278685460598916/1414611206538526791 ^ just in case that has an impact on this issue
Paquita
PaquitaOP4w ago
Thanks Antoine. app = smart-booking-membership-pro.gadget.app development I did upgrade all of those to latest as part of the shopify Next-gen migration as well as the CLI etc to make it work as it was very broken when I started it all up yesterday. The above is after all the upgrades.
Chocci_Milk
Chocci_Milk4w ago
What store are you testing on?
Paquita
PaquitaOP4w ago
testcove
Chocci_Milk
Chocci_Milk4w ago
I'm not able to reproduce the issue that you're seeing. I've installed your application on my test store and aren't getting infinite loading
Paquita
PaquitaOP4w ago
I just clicked on the preview button in gadget and it is happening. Do you also get the new next gen thing at the bottom?
Chocci_Milk
Chocci_Milk4w ago
What do you mean next gen thing?
Paquita
PaquitaOP4w ago
No description
Paquita
PaquitaOP4w ago
black bit at the bottom
Chocci_Milk
Chocci_Milk4w ago
Thats not the preview I thought you were talking about I don't see that no
Paquita
PaquitaOP4w ago
No description
Chocci_Milk
Chocci_Milk4w ago
Yes, that preview is the Gadget preview. I tried that and there were no issues there
Paquita
PaquitaOP4w ago
so why am I getting an issue when I run it. Surely it's the same code? you are looking at console log?
Chocci_Milk
Chocci_Milk4w ago
Mind clearing your browser cache to see if thats the issue?
Paquita
PaquitaOP4w ago
cleared. then logged on again to gadget and logged on again shopify. but still the same issue counting up again at 500,000 it refers to this file briefly: https://assets.gadget.dev/assets/devHarness.min.js the migration changed the need for the env file. it apparently now has a UID that is the same for both production and development. I note there is stil and env.development file that has ID numbers that aren't the same as the new UID for the extensions. Although, while trying to get into Shopify Admin, the extensions aren't in play
Paquita
PaquitaOP4w ago
that number of messages just keeps cycling until it hits around 1.5m, then shuts the console window at the bottom. You can see the reference to devHarness.min.js
No description
Paquita
PaquitaOP4w ago
I'm updating Chrome to rule that out too thanks Antoine for assisting. I tested in your antoine-dev version and the issue persists. I don't know what more to do at I cannot see what the code for: https://assets.gadget.dev/assets/devHarness.min.js is looking at that is clearly failing and I can't keep letting this count up to 1.5m as it is using up internet bandwidth. So I am at a standstill at the moment.
Chocci_Milk
Chocci_Milk4w ago
Could you please make a video and share it with me. I'm not sure that the devharness error is the issue here
Paquita
PaquitaOP4w ago
Did you do something as it is ok this morning? I didn't reboot or change anything at this end except let my laptop go to sleep overnight as I wasn't sure if you were working on something at your end.
Chocci_Milk
Chocci_Milk4w ago
No, we didn't change anything Since this is fixed for you, I'm going to mark this thread as closed Feel free to reopen by writing a message here
Gizmo
Gizmo4w ago
Do you like this answer? ​

Did you find this page helpful?