-
Notifications
You must be signed in to change notification settings - Fork 392
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
When building with CRA, we are seeing Localhost:45678 in the output #167
Comments
I haven't seen this one before. I suppose this can be fixed by this feature #157 |
You can create example application with reproducible error. Maybe your case does not need general solution (e.g. #157). |
I see the same thing happening when building an CRA app on Jenkins. Locally it works fine. |
@ohwhen @wInevitable can you provide reproducible example? If this env specific, like Jenkins, maybe it can be reproduced with Docker. |
I do not have reproducible example, so can not fix it. Feel free to reopen with example |
Here's my reproducible steps: this seems to occur when including the Facebook SDK.
If I remove the SDK and rebuild, the issue disappears. Note I have |
I managed to resolve this issue by wrapping the SDK code-snippet in:
(as outlined in recipes) Thanks for this amazing piece of software fyi! |
Hi @stereobooster,
We have a react app built with create-react-app. After setting up react-snap (https://github.com/stereobooster/react-snap#basic-usage-with-create-react-app) and running the build script (yarn run build),
localhost:45678
is set as the origin URL in the output files. So, if we deploy the app, it will try to make calls to that URL instead of the window's origin. We receive an error message in the browser console like this:Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://localhost:45678') does not match the recipient window's origin
According to the readme, no extra configuration is required when using CRA. Is there an environment variable or other value we can set to fix this behavior? Or do you know what might be causing this to happen?
Thanks for your help and please let me know if there is other information that would be helpful in debugging this matter.
The text was updated successfully, but these errors were encountered: