Expo Updates - Release Build Fails with Image

We’re in the progress of updating to expo-updates 2.0.0 and as part of that upgrade we’ve stumbled across the the following error when bundling the app in release mode with an image:

2020-05-15 15:44:05.310827+0100 HelloWorld[51454:2005049] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager copyItemAtPath:toPath:options:error:]: source path is nil'
*** First throw call stack:
	0   CoreFoundation                      0x00007fff23e39f0e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50ad79b2 objc_exception_throw + 48
	2   Foundation                          0x00007fff258b0d26 -[NSFileManager copyItemAtPath:toPath:error:] + 0
	3   HelloWorld                          0x000000010a99299a __44-[EXUpdatesEmbeddedAppLoader downloadAsset:]_block_invoke + 605
	4   libdispatch.dylib                   0x000000010b14ef11 _dispatch_call_block_and_release + 12
	5   libdispatch.dylib                   0x000000010b14fe8e _dispatch_client_callout + 8
	6   libdispatch.dylib                   0x000000010b1566fd _dispatch_lane_serial_drain + 788
	7   libdispatch.dylib                   0x000000010b15728f _dispatch_lane_invoke + 422
	8   libdispatch.dylib                   0x000000010b162b65 _dispatch_workloop_worker_thread + 719
	9   libsystem_pthread.dylib             0x00007fff51b37a3d _pthread_wqthread + 290
	10  libsystem_pthread.dylib             0x00007fff51b36b77 start_wqthread + 15
libc++abi.dylib: terminating with uncaught exception of type NSException

We’ve created a reproduction here where the app will work out the box with a yarn install, pod install and built in release mode through Xcode. If you then uncomment the line import Navigation from './src/components/navigation'; and rebuild you will receive the above error.

Note: React Navigation imports images and that’s the problem, the same demo can be reproduced by just importing and using an image in the application. Discussions here: New eject bare workflow unable to load bundled assets on Release configuration and crashes · Issue #1859 · expo/expo-cli · GitHub

Anyone have any suggestions?

1 Like

More info here on a react-navigation issue. The error sounds very similar to the note described here but we believe we’ve followed the docs to the letter.

Fixed with expo-updates@0.2.2