Skip to content

JavaScript error on laptop sleep only in release web build #97

@DmitrySikorsky

Description

@DmitrySikorsky

Hi! Thank you for your package, it is very useful.

But I have a strange problem. When I sleep my laptop, after that websocket fails to reconnect with JavaScript exception:

image

If I click the first line I will see this code:

image

So I think the problem is in this function:

https://github.com/jamiewest/signalr_core/blob/main/lib/src/hub_connection.dart#L383

But if I build the web app like

flutter build web --profile --source-maps

everything works, websocket is reconnected without problems.

At the same time, reconnection works well if I just put the app without interactions, Chrome will reduce setInterval time, and server kills the connection. But if the laptop gets sleep, after that reconnection always fail on release build.

Flutter 3.7.0, package version is 1.1.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions