Skip to content

Conversation

@chrisbobbe
Copy link
Collaborator

To let the app make network requests:
https://docs.flutter.dev/development/platform-integration/macos/building#setting-up-entitlements

As suggested in the above-linked doc, make identical changes to both entitlements files.

@chrisbobbe chrisbobbe requested a review from gnprice December 28, 2022 21:06
To let the app make network requests:
  https://docs.flutter.dev/development/platform-integration/macos/building#setting-up-entitlements

As suggested in the above-linked doc, make identical changes to both
entitlements files.
@gnprice
Copy link
Member

gnprice commented Dec 29, 2022

Thanks! Looks good; merging.

@gnprice gnprice merged commit 59eb5d5 into zulip:main Dec 29, 2022
gnprice added a commit to gnprice/zulip-flutter that referenced this pull request Jul 19, 2025
I happened to notice this message getting printed repeatedly in the
debug logs (reformatted a bit):

    [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception:
      NetworkException: HTTP request failed. Client is already closed.
      (ClientException: HTTP request failed. Client is already closed.,
       uri=https://chat.zulip.org/api/v1/users/me/presence)
    #0      ApiConnection.send (package:zulip/api/core.dart:175)
    <asynchronous suspension>
    zulip#1      Presence._maybePingAndRecordResponse (package:zulip/model/presence.dart:93)
    <asynchronous suspension>
    zulip#2      Presence._poll (package:zulip/model/presence.dart:121)
    <asynchronous suspension>

That'd be a symptom of an old Presence continuing to run its polling
loop after the ApiConnection has been closed, which happens when the
PerAccountStore is disposed.  Looks like when we introduced Presence
in 5d43df2 (zulip#1619), we forgot to call its `dispose` method.
Fix that now.

The presence model doesn't currently have any tests.  So rather than
try to add a test for just this, we'll leave it as something to
include when we write those tests, zulip#1620.
chrisbobbe pushed a commit that referenced this pull request Jul 22, 2025
I happened to notice this message getting printed repeatedly in the
debug logs (reformatted a bit):

    [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception:
      NetworkException: HTTP request failed. Client is already closed.
      (ClientException: HTTP request failed. Client is already closed.,
       uri=https://chat.zulip.org/api/v1/users/me/presence)
    #0      ApiConnection.send (package:zulip/api/core.dart:175)
    <asynchronous suspension>
    #1      Presence._maybePingAndRecordResponse (package:zulip/model/presence.dart:93)
    <asynchronous suspension>
    #2      Presence._poll (package:zulip/model/presence.dart:121)
    <asynchronous suspension>

That'd be a symptom of an old Presence continuing to run its polling
loop after the ApiConnection has been closed, which happens when the
PerAccountStore is disposed.  Looks like when we introduced Presence
in 5d43df2 (#1619), we forgot to call its `dispose` method.
Fix that now.

The presence model doesn't currently have any tests.  So rather than
try to add a test for just this, we'll leave it as something to
include when we write those tests, #1620.
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

Successfully merging this pull request may close these issues.

2 participants