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

import: Work around broken imports of '.'. #4819

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Jun 22, 2021

A bug somewhere in our stack -- presumably Metro or one of its
dependencies -- means that in src/notification/notificationActions.js
the import from . was getting resolved not to the module built from
its neighboring index.js file, as it should… but to the module
corresponding to the directory src/common/.

That also happens to be the directory where our only other imports
from . are found. Seems like the bug may involve the resolution
of . being inappropriately shared globally.

In any case, the bug goes away when we make the import reference a
little less special-looking, as ./.

Thread: https://chat.zulip.org/#narrow/stream/48-mobile/topic/Notification.20Crash/near/1215247
Fixes: #4818

A bug somewhere in our stack -- presumably Metro or one of its
dependencies -- means that in src/notification/notificationActions.js
the import from `.` was getting resolved not to the module built from
its neighboring `index.js` file, as it should… but to the module
corresponding to the directory `src/common/`.

That also happens to be the directory where our only other imports
from `.` are found.  Seems like the bug may involve the resolution
of `.` being inappropriately shared globally.

In any case, the bug goes away when we make the import reference a
little less special-looking, as `./`.

Thread: https://chat.zulip.org/#narrow/stream/48-mobile/topic/Notification.20Crash/near/1215247
Fixes: zulip#4818
@gnprice gnprice added severe: crash The app quits, or stops responding. P1 high-priority labels Jun 22, 2021
@chrisbobbe chrisbobbe merged commit 24f1a17 into zulip:master Jun 22, 2021
@chrisbobbe
Copy link
Contributor

LGTM, thanks! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 high-priority severe: crash The app quits, or stops responding.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash opening notif: getAccountFromNotificationData is undefined
2 participants