question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.62 - Missing images required from outside folder

See original GitHub issue

Environment

System: OS: macOS 10.15.3 CPU: (8) x64 Intel® Core™ i7-7700HQ CPU @ 2.80GHz Memory: 734.50 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.1 - /usr/local/opt/node@12/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/opt/node@12/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Android Studio: 3.6 AI-192.7142.36.36.6200805 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: react: 16.11.0 => 16.11.0 react-native: 0.62.0 => 0.62.0

Upgrading version

0.61.5 -> 0.62 upgraded manually according to this https://github.com/react-native-community/upgrade-support/issues/13 - everything is done except localization migration and recommended settings update - there are no issues in issues navigator. Project runs fine without it

Description

The problem: In release builds on iOS, images that are imported from outside of project root are not shown Description: We are using yarn workspaces, and images for the project are stored outside of the project root, few levels higher. metro.config.js is configured to properly resolve paths to these assets (through resolvers.extraNodeModules). Problem occurs when running application in “Release” build configuration on iOS - images that are required from outside of project root are blank. “Debug” configuration and also Android builds (debug and release) don’t have this problem. Build doesn’t crash, there are no warnings. console.log(require('@resources/image.png')) properly logs a number. Requiring the same image through aliases ('../../resources/image.png' and '@resources/image.png') logs the same number as expected Sometimes after running in “Debug” configuration it is also possible to get your images in “Release”, given I don’t clean build folder in xcode. If I do clean build folder though, no images appear

Reproducible demo

I tried to reproduce the problem by creating 2 new projects with react-native init (0.61.5 and 0.62) and none of these projects have this issue, which leads me to believe something went wrong during upgrade

Looking forward to any possible suggestions

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

7reactions
jamesmalincommented, Sep 22, 2020

Is this being corrected soon?

4reactions
christianbachcommented, Apr 14, 2020

I took a look inside the create release app and there is a few differences in the assets dir from 0.61 and 0.62

0.62 image

0.61 Screenshot 2020-04-14 at 09 23 35

These commits seems relevant: https://github.com/react-native-community/cli/pull/939 https://github.com/facebook/react-native/pull/27932

My hunch is that the cli side got released but the react-native side didn’t make it to 0.62. Perhaps @janicduplessis or @grabbou has some insights?

I can confirm that patching react-native/Libraries/Image/AssetSourceResolver.js with the changes from https://github.com/facebook/react-native/pull/27932/files#diff-19fe76b55a3380d421bb1ebe901b35e3 works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native iOS not showing images (pods issue)
On Android they are working fine. What I have done to solve the problem but didn't work: -Upgrade my react-native version from "0.61.5"...
Read more >
Missing photos troubleshooter for Picasa - Google Sites
Step 2: Ensure the folders are being watched (scanned) by Picasa ... For most normal photo collections, "Scan Once" (the green check mark)...
Read more >
How to find missing photos in Photoshop Lightroom Classic
(Optional) In the Locate dialog box, select Find Nearby Missing Photos to have Lightroom Classic search for other missing photos in the folder ......
Read more >
5 Reasons Your Images Go Missing In Lightroom Classic
If you go on your computer and move a folder of images to a different internal drive, or an external hard drive, Lightroom...
Read more >
Psych Engine [Friday Night Funkin'] [Mods] - GameBanana
Optimization Audio & Images Caching Overhaul (by Yoshubs) ... Permission is not needed for using the Engine, as long as all contributors are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found