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

Web support #96

Open
NikyAccet53 opened this issue Oct 14, 2024 · 13 comments
Open

Web support #96

NikyAccet53 opened this issue Oct 14, 2024 · 13 comments

Comments

@NikyAccet53
Copy link

Web platform is not supported.
A few weeks ago it worked, but now it doesn't work anymore.
It would be very useful if it would be supported

@mahanpyk
Copy link

I also found the same problem and the developers of this repository suddenly removed the web support in the new version without even mentioning this in their changelog!!
This is really ridiculous

@hmoreno-bertoni
Copy link

Same problem here. I went back to 1.3.9.

@autocar
Copy link

autocar commented Oct 15, 2024

Version 1.3.9 works on the web. I'm using it.

@NikyAccet53
Copy link
Author

What version of flutter do you have?
I have 3.24.3 installed and even if i go back to version 1.3.9 I still have thiis error on web:

SEVERE: 2024-10-15 21:24:26.392: WebSocket connection to 'wss://...ENDPOINT...' failed: Unsupported operation: Platform._version
SEVERE: 2024-10-15 21:24:26.393: Failed to start the transport 'HttpTransportType.WebSockets': Unsupported operation: Platform._version
SEVERE: 2024-10-15 21:24:31.689: (SSE transport) error when listening to stream: [object Event]
SEVERE: 2024-10-15 21:24:31.691: Connection disconnected with error '[object Event]'.

@autocar
Copy link

autocar commented Oct 15, 2024

Even if you change the version in flutter, it may still be using 1.4.0 from that cache (it happened to me). Try using flutter pub cache clean and flutter clean. To see which version it is using, you can see the version used by clicking on the imported file in the editor.

@autocar
Copy link

autocar commented Oct 15, 2024

before i forget, the versions i used:
Flutter 3.24.3
Dart 3.5.3

@NikyAccet53
Copy link
Author

I tried cleaning pub cache and do a flutter clean and, even if in the pubspec.yaml it's specified the version 1.3.9 somehow it uses the 1.4.0.
In the cache folder there is only signalr_netcore-1.4.0 and the dependency is not inherited by others, is the only present in my pubspec

@autocar
Copy link

autocar commented Oct 16, 2024

When adding the package, add it as signalr_netcore: 1.3.9, not signalr_netcore: ^1.3.9. Try without the ^ character.

@NikyAccet53
Copy link
Author

@autocar you saved my day! Thank you very much!
Why does it work in a different way signalr_netcore: 1.3.9 vs signalr_netcore: ^1.3.9?

Let's hope they will support again web version in the next releases like before...

@autocar
Copy link

autocar commented Oct 16, 2024

I'm glad your problem is solved.
For your question about versions;

Specifying Versions in pubspec.yaml
The versions in pubspec.yaml can be specified as follows:

Package name: [space]
 If no version is specified, the latest version is automatically selected. It is recommended to specify a concrete version for important packages to avoid breaking changes.

Package name: 1.0.0
 The specified version is selected.

Package name: “>=1.0.0 <2.0.0”
 The version is selected within the specified range.

Package name: ^1.0.0
 Automatically selects the version within the range with the same major version as the specified version. This is equivalent to “>=1.0.0 <2.0.0”.

If no version is specified, the latest version is automatically selected, but it is recommended to specify a concrete version for important packages to avoid unexpected issues.

source: https://flutterdevelop.blog/en/pubspec-yaml/

@Zeinab-Kouhkan
Copy link

I have issue with version 1.4.0 on Flutter web. Farsi text is converted to characters like �ا����.

@avnotaklu
Copy link

Version 1.4.0 uses dart:io without a fallback for web, i have fixed it in #104

@AdaptGit
Copy link

when will this branch be in main?

Version 1.4.0 uses dart:io without a fallback for web, i have fixed it in #104

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

No branches or pull requests

7 participants