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

[iOS Simulator] App fails to reload when using custom fonts and New Relic agent #108

Closed
morganick opened this issue Jun 21, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@morganick
Copy link

Description

In the iOS simulator after adding the NewRelic agent code, the application will fail to reload from the developer menu after adding custom fonts. The application will just show a white screen as though it can no longer connect to metro. If you close out the application completely, the application will boot normally until you open the developer menu and tap reload.

This only happens on iOS. Android works as expected.

Additional Notes:

The project is using dummy keys so I expect the new relic agent to not be able to connect. This, however, should not affect the application.

I also noticed that this application continues to try to connect repeatedly. I'm assuming because of the agent. You'll also notice that the memory will continue to grow .1Mb every 15 seconds or so. I profiled a bare RN project and it did not exhibit this issue.

If you drop down to the native code and comment out the call to [NewRelic startWithApplicationToken:appKey..., the bug goes away, but of course so does NR.

Steps to Reproduce

Clone yulolimum/newrelic-react-native-agent and checkout the crash-repo branch.

  1. Uncomment the commented out font code in App.tsx
  2. Rebuild the app
  3. Application will boot normally and update with changes.
  4. Pull up dev menu and reload
  5. This just shows a white screen
  6. If you fully close the app and open it back up, it will work again until you do a developer menu reload again.

If you comment out the font code or comment out the new relic agent startup, this functionality will start to work again.

Expected Behavior

When using the reload from the developer menu, the application will reload and not just show a white screen.

Relevant Logs / Console output

There is no console output except that the agent has started successfully.

Your Environment

macOS 13.4
Java: zulu-11.64.19
nodejs: 20.2.0
ruby: 3.2.2
CocoaPods: 1.12.1 from bundle

System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 20.33 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.2.0 - ~/.asdf/installs/nodejs/20.2.0/bin/node
    Yarn: 1.22.19 - ~/.asdf/installs/nodejs/20.2.0/bin/yarn
    npm: 8.11.0 - ~/dev/ir/node_modules/.bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9862592
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.19 - /Users/[username]/.asdf/shims/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.11 => 0.71.11
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
@morganick morganick added the bug Something isn't working label Jun 21, 2023
@morganick
Copy link
Author

Thanks @yulolimum for creating the repo that exhibits this issue.

@ndesai-newrelic
Copy link
Contributor

@morganick I tried to reload the app with front line uncommented but app is still reloading fine. can you share video or screenshot where you are seeing this issue?

@morganick
Copy link
Author

@ndesai-newrelic absolutely!

https://drive.google.com/file/d/11Lg55D0oIH07TVFmlfrgGOXEm2HyoFEb/view

I've also included what my diff is between the current state of the crash-repro branch. Let me know if you need anything else!

@ndesai-newrelic
Copy link
Contributor

@morganick If you disable the following line in your Podfile: :flipper_configuration => flipper_config, this issue will be resolved. There is a compatibility problem between the New Relic agent and Flipper, where both attempt to instrument the same items, causing this issue.

@morganick
Copy link
Author

@ndesai-newrelic issue persists after disabling :flipper_configuration => flipper_config, in Podfile:
image

@ndesai-newrelic
Copy link
Contributor

@morganick did you run pod install again after disable the flipper?

@morganick
Copy link
Author

🤦 Nope... with Flipper disabled, it now works as expected. Is this mentioned in documentation?

@ndesai-newrelic
Copy link
Contributor

@morganick We have recently identified such issues with Flipper and are planning to update our documentation accordingly. Additionally, we will work on resolving the compatibility concerns between New Relic and Flipper.

@morganick
Copy link
Author

@ndesai-newrelic Thanks, looks like Flipper is getting replaced in 0.73 as well.

react-native-community/discussions-and-proposals#641

@yulolimum
Copy link

Don't mean to add noise to this convo, but I'm not surprised it's Flipper. RN-Firebase has compatibility issues with Flipper as well: https://rnfirebase.io/#altering-cocoapods-to-use-frameworks

@ndesai-newrelic ndesai-newrelic closed this as not planned Won't fix, can't repro, duplicate, stale Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants