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

TypeError: exports.DOMException is not a constructor #1133

Closed
shlaikov opened this issue Oct 9, 2019 · 1 comment
Closed

TypeError: exports.DOMException is not a constructor #1133

shlaikov opened this issue Oct 9, 2019 · 1 comment
Assignees

Comments

@shlaikov
Copy link

shlaikov commented Oct 9, 2019

image

First ex.

TypeError: exports.DOMException is not a constructor
    at http://localhost:8081/src/index.tsx.bundle?platform=ios&dev=true&minify=false:30843:7
    at http://localhost:8081/src/index.tsx.bundle?platform=ios&dev=true&minify=false:30402:68
    at http://localhost:8081/src/index.tsx.bundle?platform=ios&dev=true&minify=false:30403:5

DOMException is undefined.

Second ex. it's my issue.

Error: 400: An update check must include a valid deployment key - please check that your app has been configured correctly. To view available deployment keys, run 'code-push deployment ls <appName> -k'.

Originally posted by @shlaikov in #1131 (comment)

@RedMickey
Copy link
Contributor

Hi @shlaikov, we have investigated this issue and found out that exports.DOMException is not a constructor exception is expected behavior.
React Native Tools extension debugs React Native apps as a Node.js processes. There aren't DOM modules in Node.js global context, so such an exception is thrown. With respect to your situation the exception occurs because React Native fetch function is used in some project's dependencies or app code.
This exception is generated in whatwg-fetch package which is a polyfill for fetch function. However exports.DOMException is not a constructor exception is successfully handled by whatwg-fetch implementation and the corresponding DOMException object is created.
We created an issue in whatwg-fetch repo, so you can track it there.
Since this behavior is connected with external package I'm closing that issue, feel free to open new ones if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants