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

Time out initial fetch, and go to account-picker screen #4165

Closed
gnprice opened this issue Jun 17, 2020 · 6 comments · Fixed by #4226 or #4754
Closed

Time out initial fetch, and go to account-picker screen #4165

gnprice opened this issue Jun 17, 2020 · 6 comments · Fixed by #4226 or #4754
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness a-multi-org a-onboarding Everything you would do when first joining a realm. P1 high-priority

Comments

@gnprice
Copy link
Member

gnprice commented Jun 17, 2020

If you launch the app, and the last server you'd been using is one that is now impossible to reach... currently we just stay at the loading screen forever, endlessly retrying the initial fetch.

If that's the only server you ever wanted to use, then this isn't so bad, given that there's not much useful we can do until the server is back. But if you'd like to go use some other server, then you're completely blocked from doing so. If the server doesn't come back, your only remedy is to clear the app's data entirely (or uninstall and reinstall) and log into those other servers from scratch. This is #4159, as described at #4159 (comment) .

We should do better. As a minimal version, if the initial fetch takes a completely unreasonable amount of time (maybe one minute), we should give up and take you to the account-picker screen so you can try a different account and server.

(An improved followup version might continue loading but show a message like "Still working..." and an action "Switch account" on the loading screen, after a much shorter period like 7 seconds.)

Here's how I'd go about implementing this:

  • The key logic to change is in doInitialFetch, around api.registerForEvents with the pair of tryUntilSuccessful calls.
  • That logic already handles the case where the load is outright rejected by the server -- that's the isClientError case inside tryUntilSuccessful, and the catch block outside it that calls dispatch(logout()).
  • What's needed is to also handle the case where the server simply doesn't respond, or responds with a 5xx error. We don't want to log out in that case, because the credentials may still be perfectly good -- but we do want to abort.
  • For actually aborting and going to the account-picker screen, we can probably do the same thing as we do for the "Switch account" button in ProfileCard.js: dispatch(navigateToAccountPicker()). Then return out of doInitialFetch.
  • For the logic to get there: first, let's move tryUntilSuccessful into the same file as doInitialFetch and just above it, and give it a more specific name like tryFetch. (This move can be its own commit.) It's always been closely tied to that function's specific needs with its handling of 4xx errors, and we're about to make it more so.
  • Then, in the retry loop, check how long it's been since we started -- if it's more than a timeout constant like 60 seconds, throw an exception. In the catch block around the requests, still do dispatch(logout()) if isClientError(e); but otherwise, abort without logging out.
@gnprice gnprice added a-multi-org a-onboarding Everything you would do when first joining a realm. a-data-sync Zulip's event system, event queues, staleness/liveness P1 high-priority labels Jun 17, 2020
@chrisbobbe
Copy link
Contributor

  • For the logic to get there: first, let's move tryUntilSuccessful into the same file as doInitialFetch and just above it, and give it a more specific name like tryFetch. (This move can be its own commit.) It's always been closely tied to that function's specific needs with its handling of 4xx errors, and we're about to make it more so.

fetchPrivateMessages also uses tryUntilSuccessful. Does that look like a mistake, now that we're going to change tryUntilSuccessful to more specifically address doInitialFetch's needs? If it's not a mistake, I wonder why, e.g., fetchMessagesInNarrow doesn't use it.

@gnprice
Copy link
Member Author

gnprice commented Jun 17, 2020

fetchPrivateMessages also uses tryUntilSuccessful. Does that look like a mistake, now that we're going to change tryUntilSuccessful to more specifically address doInitialFetch's needs?

Huh, good catch -- I'd looked for uses of tryUntilSuccessful but somehow I'd missed that one!

Reading it, I think it'd be fine for it to continue to use the helper when it grows a timeout, or also fine for it to just have its current behavior inlined as a BackoffMachine loop... or really basically fine for it to just try once and not bother retrying, just as fetchMessages does. (Especially as this function is doomed anyway, as the jsdoc tells us.)

I think the reason it differs from fetchMessagesInNarrow is just that this helper was factored out from the initial fetch (in 0a3149c), and it had the retry there because the rest of the initial fetch does.

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 18, 2020
`tryUntilSuccessful` is about to grow a timeout, which we've had in
mind in particular for the initial fetch. It's also about to be
moved into this file, and we want to keep its association with
`doInitialFetch` by putting it directly above it, with nothing in
between.

Removing this call site lets us do so without ESLint complaining of
`no-use-before-define`. And Greg says it's all the same to him [1],
especially since `fetchPrivateMessages` is doomed to be deleted
anyway, as the JSDoc says.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 18, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 18, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 18, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 18, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 23, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

Also, remove two pretty trivial tests, and adapt the third (that
tests that a retry is done) to use Lolex. Add another test to
confirm that a 4xx error does indeed halt the retry loop and get
thrown.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 23, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 23, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
`tryUntilSuccessful` is about to grow a timeout, which we've had in
mind in particular for the initial fetch. It's also about to be
moved into this file, and we want to keep its association with
`doInitialFetch` by putting it directly above it, with nothing in
between.

Removing this call site lets us do so without ESLint complaining of
`no-use-before-define`. And Greg says it's all the same to him [1],
especially since `fetchPrivateMessages` is doomed to be deleted
anyway, as the JSDoc says.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
`tryUntilSuccessful` is about to grow a timeout, which we've had in
mind in particular for the initial fetch. It's also about to be
moved into this file, and we want to keep its association with
`doInitialFetch` by putting it directly above it, with nothing in
between.

Removing this call site lets us do so without ESLint complaining of
`no-use-before-define`. And Greg says it's all the same to him [1],
especially since `fetchPrivateMessages` is doomed to be deleted
anyway, as the JSDoc says.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 16, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 12, 2020
`tryUntilSuccessful` is about to grow a timeout, which we've had in
mind in particular for the initial fetch. It's also about to be
moved into this file, and we want to keep its association with
`doInitialFetch` by putting it directly above it, with nothing in
between.

Removing this call site lets us do so without ESLint complaining of
`no-use-before-define`. And Greg says it's all the same to him [1],
especially since `fetchPrivateMessages` is doomed to be deleted
anyway, as the JSDoc says.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 12, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 14, 2020
`tryUntilSuccessful` is about to grow a timeout, which we've had in
mind in particular for the initial fetch. It's also about to be
moved into this file, and we want to keep its association with
`doInitialFetch` by putting it directly above it, with nothing in
between.

Removing this call site lets us do so without ESLint complaining of
`no-use-before-define`. And Greg says it's all the same to him [1],
especially since `fetchPrivateMessages` is doomed to be deleted
anyway, as the JSDoc says.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 14, 2020
As Greg says [1], it's always been closely tied to
`doInitialFetch`'s specific needs, with its handling of 4xx errors.
We're about to make it more so, by adding timeout logic.

[1]: zulip#4165 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 25, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Aug 25, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
@gnprice
Copy link
Member Author

gnprice commented Sep 23, 2020

This was accidentally closed by merging #4226. A clause like They don't fix #4165 at all is dangerous 😉

@gnprice gnprice reopened this Sep 23, 2020
@chrisbobbe
Copy link
Contributor

chrisbobbe commented Sep 23, 2020

Yikes, indeed!! Thanks for catching this.

@chrisbobbe
Copy link
Contributor

chrisbobbe commented Sep 23, 2020

I posted a note on the current status at #4193 (comment) (and explicitly linked that PR with this issue—oops).

EDIT: We've figured out that snag and the PR is ready for review 😄

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Oct 27, 2020
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jan 11, 2021
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Feb 8, 2021
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 13, 2021
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 13, 2021
Using `INITIAL_FETCH_ABORT` and `promiseTimeout`, which we set up in
the last few commits, abort and go to the accounts screen if the
initial fetch is taking too long.

Fixes: zulip#4165
@chrisbobbe
Copy link
Contributor

chrisbobbe commented Apr 13, 2021

See discussion on CZO here that was part of the path to my PR #4193.

chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 27, 2021
We already declare a direct dependency on Jest 26 (and have done
since fb23341), but it doesn't get pulled in. Empirically, that
seems to be because `jest-expo` brings in Jest 25.

We know we'll soon want Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that it'd be nice to keep `jest-expo`, to
use the `jest-expo/ios` and `jest-expo/android` presets (which we'll
do later in this series). We hope we can end the pattern of adding
and removing `jest-expo` again and again:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 29, 2021
We've had Jest 26 as a direct dependency for a while (since
fb23341), so it's surprising that the `jest` command hasn't been
using it.

As Greg points out [0], that turns out to be because `jest-expo`
apparently provides its own wrapper for the `jest` command, using
the Jest that `jest-expo` depends on. That's Jest 25, even in
`jest-expo`'s latest. And Yarn ends up giving us that wrapper.

We know we'll soon want to use Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that we don't really want to jettison
`jest-expo` again, as we've done a few times as we learn new things:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

In particular, we really want to use the `jest-expo/ios` and
`jest-expo/android` presets (which we'll do later in this series).

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[0] zulip#4700 (comment)
[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Apr 30, 2021
We've had Jest 26 as a direct dependency for a while (since
fb23341), so it's surprising that the `jest` command hasn't been
using it.

As Greg points out [0], that turns out to be because `jest-expo`
apparently provides its own wrapper for the `jest` command, using
the Jest that `jest-expo` depends on. That's Jest 25, even in
`jest-expo`'s latest. And Yarn ends up giving us that wrapper.

We know we'll soon want to use Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that we don't really want to jettison
`jest-expo` again, as we've done a few times as we learn new things:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

In particular, we really want to use the `jest-expo/ios` and
`jest-expo/android` presets (which we'll do later in this series).

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[0] zulip#4700 (comment)
[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 4, 2021
We've had Jest 26 as a direct dependency for a while (since
fb23341), so it's surprising that the `jest` command hasn't been
using it.

As Greg points out [0], that turns out to be because `jest-expo`
apparently provides its own wrapper for the `jest` command, using
the Jest that `jest-expo` depends on. That's Jest 25, even in
`jest-expo`'s latest. And Yarn ends up giving us that wrapper.

We know we'll soon want to use Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that we don't really want to jettison
`jest-expo` again, as we've done a few times as we learn new things:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

In particular, we really want to use the `jest-expo/ios` and
`jest-expo/android` presets (which we'll do later in this series).

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[0] zulip#4700 (comment)
[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
gnprice pushed a commit to gnprice/zulip-mobile that referenced this issue May 6, 2021
We've had Jest 26 as a direct dependency for a while (since
fb23341), so it's surprising that the `jest` command hasn't been
using it.

As Greg points out [0], that turns out to be because `jest-expo`
apparently provides its own wrapper for the `jest` command, using
the Jest that `jest-expo` depends on. That's Jest 25, even in
`jest-expo`'s latest. And Yarn ends up giving us that wrapper.

We know we'll soon want to use Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that we don't really want to jettison
`jest-expo` again, as we've done a few times as we learn new things:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

In particular, we really want to use the `jest-expo/ios` and
`jest-expo/android` presets (which we'll do later in this series).

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[0] zulip#4700 (comment)
[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 10, 2021
We've had Jest 26 as a direct dependency for a while (since
fb23341), so it's surprising that the `jest` command hasn't been
using it.

As Greg points out [0], that turns out to be because `jest-expo`
apparently provides its own wrapper for the `jest` command, using
the Jest that `jest-expo` depends on. That's Jest 25, even in
`jest-expo`'s latest. And Yarn ends up giving us that wrapper.

We know we'll soon want to use Jest 26 for a few things:

- The "modern" implementation of fake timers [1], for zulip#4165.

- The `selectProjects` CLI argument [2], for testing Android
  codepaths in a nice way (later in this series).

But we've *also* realized that we don't really want to jettison
`jest-expo` again, as we've done a few times as we learn new things:

62621ef jest: Add `jest-expo` preset, to be used in the next commit.
347aa96 jest: Back out `jest-expo` preset, for now.
c4fca9d jest: Add and use `jest-expo` preset, again.

In particular, we really want to use the `jest-expo/ios` and
`jest-expo/android` presets (which we'll do later in this series).

This is a hack because the `resolutions.jest-expo/jest` range
`^26.4.1` is incompatible with the original range that `jest-expo`
declares; that's `^25.2.0`. We believe this should get us a warning
from Yarn; according to a doc [3], "You will receive a warning if
your resolution version or range is not compatible with the original
version range." I haven't seen a warning like that, even after
removing node_modules and running `yarn`; this seems like a Yarn
bug.

I've opened expo/expo#12735 to bump Jest in the `jest-expo` project;
this hack should hopefully be fine while we wait for that.

[0] zulip#4700 (comment)
[1] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2600
[2] https://github.com/facebook/jest/blob/master/CHANGELOG.md#2610
[3] https://classic.yarnpkg.com/en/docs/selective-version-resolutions/#toc-tips-tricks
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 19, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 20, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue May 21, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 2, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jun 25, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Jul 15, 2021
So far, `tryFetch`'s only callers are in the initial fetch; so, add
handling for the `TimeoutError` there.

The choice of value for `requestLongTimeoutMs` comes from a
suggestion in zulip#4165's description:

> As a minimal version, if the initial fetch takes a completely
> unreasonable amount of time (maybe one minute), we should give up
> and take you to the account-picker screen so you can try a
> different account and server.

Fixes: zulip#4165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-data-sync Zulip's event system, event queues, staleness/liveness a-multi-org a-onboarding Everything you would do when first joining a realm. P1 high-priority
Projects
None yet
2 participants