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

[$125] [Dev] Console Warning: No native ExponentConstants module found #51054

Open
1 of 8 tasks
m-natarajan opened this issue Oct 17, 2024 · 13 comments
Open
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 17, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number:
Reproducible in staging?: DEV
Reproducible in production?: DEV
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @eVoloshchak
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1729174865370699

Action Performed:

  1. Launch the iOS app
  2. Observe the warning

Expected Result:

No warning is displayed

Actual Result:

Warning is displayed

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence ![Simulator Screenshot - iPhone 15 Pro - 2024-10-17 at 16 17 56](https://github.com/user-attachments/assets/2e076611-8c45-408f-ac83-fa1e228efc92)
Screen.Recording.2024-10-17.at.16.20.46.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021849240595196131510
  • Upwork Job ID: 1849240595196131510
  • Last Price Increase: 2024-10-24
Issue OwnerCurrent Issue Owner: @mollfpr
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

A "No native ExponentConstants module found" warning is shown.

What is the root cause of that problem?

We don't link the expo-const module, so it's not found.

App/package.json

Lines 354 to 357 in c3d33fc

"expo": {
"autolinking": {
"exclude": [
"expo-constants",

expo-const is being used in expo-asset module and it's found in PlatformUtils file. However, all the properties that is being used inside the file doesn't exist even if we installed the expo-const.
https://github.com/expo/expo/blob/d576550145ede25dec3f6636bf260f7b05bec7a6/packages/expo-asset/src/PlatformUtils.ts#L32-L39

So, it's no different whether we include expo-const module or not. Here is the available properites from expo-const.

{"addListener": [Function addListener], "debugMode": true, "deviceName": "iPhone 15 Plus", "emit": [Function emit], "executionEnvironment": "bare", "getWebViewUserAgentAsync": [Function getWebViewUserAgentAsync], "isHeadless": false, "listenerCount": [Function listenerCount], "manifest": {"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", "name": "new.expensify", "platforms": ["ios", "android", "web"], "sdkVersion": "51.0.0", "slug": "new.expensify", "version": "9.0.50-7"}, "platform": {"ios": {"buildNumber": "9.0.50.7"}}, "removeAllListeners": [Function removeAllListeners], "removeListener": [Function removeListener], "removeSubscription": [Function removeSubscription], "sessionId": "715902EE-F726-43EA-B204-6797A7E27318", "statusBarHeight": 54, "systemFonts": [listOfFontsTooLong]}

What changes do you think we should make in order to solve the problem?

We can suppress the warning. One way to do it is by suppressing it here.

App/src/App.tsx

Lines 48 to 53 in c3d33fc

LogBox.ignoreLogs([
// Basically it means that if the app goes in the background and back to foreground on Android,
// the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details.
// More details here: https://git.io/JJYeb
'Setting a timer for a long period of time',
]);

'No native ExponentConstants module found',

OR

We can link the expo-const by remove it from the auto-link exclude list.

App/package.json

Lines 354 to 357 in c3d33fc

"expo": {
"autolinking": {
"exclude": [
"expo-constants",

@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

@twisterdotcom Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Oct 23, 2024

@twisterdotcom Huh... This is 4 days overdue. Who can take care of this?

@twisterdotcom
Copy link
Contributor

Seems straightforward right? I haven't recreated this, so will lean on C+ too for this dev specific issue.

@melvin-bot melvin-bot bot removed the Overdue label Oct 24, 2024
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Oct 24, 2024
@melvin-bot melvin-bot bot changed the title [Dev] Console Warning: No native ExponentConstants module found [$250] [Dev] Console Warning: No native ExponentConstants module found Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021849240595196131510

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@twisterdotcom twisterdotcom changed the title [$250] [Dev] Console Warning: No native ExponentConstants module found [$125] [Dev] Console Warning: No native ExponentConstants module found Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

Upwork job price has been updated to $125

@twisterdotcom
Copy link
Contributor

Downgrading as this isn't customer facing.

@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Oct 24, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Oct 28, 2024

I'm assuming we exclude the expo-constants to reduce the binary size. I think we can suppress the warning like it proposed from @bernhardoj.

🎀 👀 🎀 C+ reviewed!

Copy link

melvin-bot bot commented Oct 28, 2024

Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@blimpich
Copy link
Contributor

Proposal seems good, but question: why is this only getting reported and fixed now? The PR that added that code was merged 10 months ago. Did we just live with warning until @eVoloshchak decided to report it?

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 28, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

6 participants