-
Notifications
You must be signed in to change notification settings - Fork 119
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
[Bug]: Post purchase extensions not working #355
Comments
Hi! Thank you for opening this issue. As you have pointed, it seems there is a problem with current CLI Go library version and widows 10 when resolving the mime type for |
Hello! Thanks for the reply. |
Are you saying that shopify CLI uses GO lang because I use nodejs environment? |
Hi @abeninski , regardless the flavour of the template you choose CLI uses a go library to scaffold and serve. |
@RapGeneral, we did not managed yet to reproduce the error mentioned for 3.8.0 so it is still not clear whether this is a different issue or the same. As soon as we get more info we will share the findings. |
Thanks for the reply. With 3.8.0 after post purchase ui extension scaffold and run I tried with node 16, 17 and 18 |
Hi @abeninski , @RapGeneral. I am sorry to say that we did not managed yet to reproduce the same error on CLI version 3.8.0, but we will keep trying to find out the source of the issue. It will be very helpful if you have a public repository that we can clone and try to reproduce the error. In the meantime, if this problem is blocking you we suggest you follow the next workaround:
|
@RapGeneral , @abeninski a new release of the CLI (3.9.0) is out and contains the changes to ignore windows registry content type. Could you please check if this version fixes your problem and give us some feedback? |
Hey @alfonso-noriega thanks for providing the fix but unfortunately still getting the 3.8 error: Do you have any idea what might be causing it. I'm running on Windows 11 |
hey @abeninski , @RapGeneral, we managed to reproduce the error and find the root cause. A new hot fix release will come soon. Basically node is generating in Windows a shell script and cmd files pointing to the node file which needs to be executed. The path of this files are provided to the CLI as entry point but the CLI expects to receive instead the path to a valid node file and fails when executing. |
FYI @abeninski, @RapGeneral, the CLI 3.9.1 is out and should resolve this problem. |
@alfonso-noriega I have tested with 3.9.2. |
Same for me. All issues resolved. Thanks alot! |
Great news! Thanks a lot for the feedback. |
Please confirm that you have:
In which of these areas are you experiencing a problem?
App, Extension
Expected behavior
After I run
yarn scaffold extension
and go trough all the steps, I expect when I runyarn dev
and configure the chrome extension to view my post purchase extension.Actual behavior
For versions prior to 3.8.0 I do not see my extension.
What I notice is that upon arriving at the
Shipping
page, just before I complete my order, a call is made to the tunnel.The request loads fine, however this error is thrown in the console:
Refused to execute script from 'https://a88e-95-43-129-67.eu.ngrok.io/extensions/dev-c97057cd-ea1e-4a36-bb8f-254b0efe2ea3/assets/main.js' because its MIME type ('text/plain') is not executable.
I tried setting an
application/javascript
header, but this changed nothing.Version 3.8.0 just throws an error at
yarn dev
:Stack trace
Reproduction steps
For 3.8.0 prior
yarn create @shopify/app
. Choose the node templateyarn scaffold extension
yarn dev
.Shipping
observe the error in the console.For 3.8.0:
yarn create @shopify/app
. Choose the node templateyarn scaffold extension
yarn dev
.Operating System
Windows 10
Shopify CLI version (check your project's
package.json
if you're not sure)First bug: 3.71. Second bug: 3.8.0
Shell
Powershell and Windows CMD
Node version (run
node -v
if you're not sure)16.15.1
What language and version are you using in your application?
Default node template
The text was updated successfully, but these errors were encountered: