Invalid URL port: "undefined"
See original GitHub issueEnvironment
- React-Native 0.66.3
- Android
Description
Running react-native webpack-start
results in error message on Android device: Invalid URL port: "undefined"
Reproducible Demo
The webpack.config.js is the same as per the template. Hermes is enabled and there isn’t really any other special configuration enabled. Logs show:
[20:27:04.678Z][DevServerProxy] Server listening at http://[::]:8081
ℹ [20:27:04.680Z][DevServerProxy] Dashboard available at: http://localhost:8081/dashboard
ℹ [20:27:06.024Z][DevServerProxy] Hermes device connected { deviceId: 0 }
ℹ [20:27:25.051Z][DevServerProxy] Dashboard client connected { clientId: 'client#0' }
ℹ [20:27:39.099Z][DevServerProxy] Starting compiler worker { platform: 'android', port: 46031 }
ℹ [20:27:39.966Z][DevServer@android] Server listening at http://[::]:46031
ℹ [20:27:39.970Z][DevServerProxy] fetching from remote server { source: 'http://localhost:46031/index.bundle?platform=android' }
ℹ [20:27:40.044Z][DevServerProxy] fetching from remote server {
source: 'http://localhost:46031/api/dashboard/stats?platform=android'
}
ℹ [20:27:40.046Z][DevServerPlugin] Successfully run: /opt/android-sdk/platform-tools/adb reverse tcp:46031 tcp:46031
ℹ [20:27:40.055Z][webpack-dev-middleware] wait until bundle finished: /index.bundle?platform=android
ℹ [20:27:40.061Z][DevServer@android] Dashboard client connected { clientId: 'client#0' }
ℹ [20:27:40.080Z][webpack-dev-middleware] wait until bundle finished: /api/dashboard/stats?platform=android
ℹ [20:28:06.399Z][LoggerPlugin] Bundle built { time: 26241 }
ℹ [20:28:06.432Z][DevServerProxy] response received
ℹ [20:28:06.472Z][DevServerProxy] response received
ℹ [20:28:55.618Z][DevServerProxy] fetching from remote server {
source: 'http://localhost:46031/index.bundle?platform=android&dev=true&minify=false&app=com.dominate&modulesOnly=false&runModule=true'
}
ℹ [20:28:55.642Z][DevServerProxy] response received
ℹ [20:28:55.999Z][DevServerProxy] React Native client connected { clientId: 'client#0' }
ℹ [20:28:56.663Z][Console] [HMRClient] Connecting... {"url": "ws://10.0.2.2:undefined/__hmr"}
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
Invalid URL with middleware · Discussion #40344 · vercel/next.js
Server Error TypeError: Invalid URL This error happened while generating the page. Any console logs will be displayed in the terminal window ...
Read more >Proxy target route to invalid url - node.js - Stack Overflow
I have tried coming up with some ways to fix this, but have (obviously) not been succesful: Add the port (1001) to the...
Read more >builtins.URL.hostname JavaScript and Node.js code examples
if (!isValidDomain(url.hostname)) { throw new Error('Invalid url hostname'); ... config.port = Number(parsedUrl.port) config.username = parsedUrl.username.
Read more >URL | Node.js v19.3.0 Documentation
Invalid URL characters included in the value assigned to the hash property are percent-encoded. The selection of which characters to percent-encode may vary ......
Read more >How to Check if a JavaScript String is a Valid URL
In the first three cases, you can see that an invalid URL string is passed. As a result, URL object creation fails with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Done!
Yeah, if you could send a PR, that would be awesome.
As for the speed of hot reloading, there’s little we can do, since it’s a Webpack thing.