Skip to content
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

Add message to clarify error for non-serializable configs #1168

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

jkeen
Copy link
Contributor

@jkeen jkeen commented Mar 18, 2022

This is such a tiny change, but this error has been coming up in some apps and it gave me very little clue of what to do about it. Only after digging through the source and putting in debug messages did I realize that my environment file had some regex values, and those are not allowed?

I'm not sure of the details as to why regex values aren't allowed in the config currently, but I will say any apps that are using Fastboot and have set it up according to their docs will probably run into this cryptic error without a clear path to solve it.

https://ember-fastboot.com/docs/user-guide#the-host-whitelist

For security, you must specify a hostWhitelist of expected hosts in your application's config/environment.js:
hostWhitelist entries can be a String or RegExp to match multiple hosts.

@jkeen
Copy link
Contributor Author

jkeen commented Mar 18, 2022

And now that I know what the issue was, these other issues are related:

  • this one that was about the original message
  • this issue talking about the regex in the config for fastboot.

@ef4 ef4 merged commit a5380bf into embroider-build:main Apr 13, 2022
@ef4
Copy link
Contributor

ef4 commented Apr 13, 2022

Thanks.

I hesitated at first because the console output is already loud, but I agree that without something here this is hard for people to debug.

@ef4 ef4 added the enhancement New feature or request label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants