aspnetcore
aspnetcore copied to clipboard
"Error: URL.pathname not implemented signalr" - @microsoft/signalr V8.0.0 on React-Native 0.72.7
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
Hi,
I updated the @microsoft/signalr package on my react-native app from V7.0.12 to V8.0.0 and it stopped working after the update. The connection is failing when firing the start() method. The error: "Error: URL.pathname not implemented signalr".
This is the code (which works fine with V7.0.12):
let hubConnection = new HubConnectionBuilder()
.withUrl(`${CONFIG.MOBILE_SERVER_BASE_URL}/${hubName}`, { transport: HttpTransportType.WebSockets })
.build();
hubConnection.start()
.then(() => {
...
})
.catch((error) => {
...
});
Thanks
Expected Behavior
Fix this bug
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
I have the same issue
Same issue here
Can anyone help to solve this error, I'm also getting the same error.
same error for me as well with version 8.0.0
same error for me as well with version 8.0.0
same error with version 8.0.0
Same issue, reverting back to v7 fixed it for me. Looks like something is wrong in v8 for react native
The same issue is reproducible with v8.0.0 of @microsoft/signalr package in the React Native environment. Works well after rolling back to v7.0.12.
Installing https://www.npmjs.com/package/react-native-url-polyfill did the trick for me
@vasafix Thanks! your solution works for me
Installing https://www.npmjs.com/package/react-native-url-polyfill did the trick for me
I installed it, it did not resolve the issue. What did you exactly?
@abdulwahid211 Did you add
import 'react-native-url-polyfill/auto';
in your entry-poin as per documentation?
https://www.npmjs.com/package/react-native-url-polyfill#option-1-simple
other than that, I don't know where could be the problem
Installing https://www.npmjs.com/package/react-native-url-polyfill did the trick for me
Thanks for your help!.
Installing https://www.npmjs.com/package/react-native-url-polyfill did the trick for me
Thanks for your help!.
Thanks, it works for me @vasafix