Hard Hard.. Upgrade from expokit again

I’ve been waiting for new sdk so long and I’ve just tried this upgrade from 4 hours ago and found there is error in clean detached app. Same as last upgrade, makes me really frustrating…

When I create new expo project and detach. Then go to ios directory and run pod install, it just fails.

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Pre-downloading: `ExpoKit` from `http://github.com/expo/expo.git`, tag `ios/2.4.4`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] Unable to find a specification for `boost-for-react-native` depended upon by `Folly`

Also readme in here, I think it is old and wrong. Because I ran sdk 25 from clean install and moved all my project files to be able to run above it, it didn’t require files in .expo-source/android. I am running it in sdk 25 but nothing exists inside here.

I feel like expo team is not testing the upgarde for expokit because I am really having hard time for each upgrade since sdk 24. Last time, it took me 3 days to just upgrade. Also, lastime I didn’t have problem with ios but this time yes.

Please, and please could you test this upgrade from expokit? Or provide us some example how expokit upgrade actually works?

This is very pleased.

1 Like

Hey @dooboolab,

Sorry about this frustrating process. We try to simply the process as much as we can but once you detach things get much more complex and if you don’t have a solid knowledge base of how cocoapods and JS interplay with each other, it gets pretty murky.

One thing I’d recommend, is to compare your Podfile and Podfile.Lock` with a new detached project. I posted them in this thread if you want to check them out: Upgrading to SDK 26 - Pod install issue - #9 by adamjnav

Cheers,

Adam

1 Like

@adamjnav
Thank you for your reply. I’ve tried the link you posted but I am still facing the same error. What I’ve just did is create new project from expo xde and run exp detach.
Then ran npm install.
Then goto ios directory and run pod install. I’ve checked the Podfile described in your link provided.
Could you try the detach from the new expo project also? I’ve not tested android project yet since ios one is not working.


Solved.

You should pod update first as described in issue here.

Also, I really hope the upgrade readme to be updated as I told earlier since android part, I believe it is not working as described in here.

Thank you for the help!

I am facing another issue and having another hard time trying to solve myself. I hope you could give me any idea. I"ve succeeded in buidling ios but not I can’t import the js.


I have the right import statement like below and it is working fine in my previous expo25-detached project.

import { Platform, StatusBar, StyleSheet, View } from 'react-native';
    "assetBundlePatterns": [
      "**/*",
      "assets/**",
      "node_modules/react-navigation/src/**/*.png",
      "node_modules/@expo/vector-icons/fonts/*.ttf"
    ],

I’ve tried with below too.

    "assetBundlePatterns": [
      "**/*",
    ],

Above is my assetBundlePatterns, wondering if this can be related. I am comparing with expo 26 detached project very thoroughly, one by one, it is very much time consuming…

P.S. Haven’t got into Android yet. I’m afraid if there is much more to go for like last time.

Hey @dooboolab,

Asset Bundling is not supported in detached projects (unless something changed and I’m not aware of it).

Adam

@adamjnav
This is strange because I didn’t have problem using it like in detached expo app from sdk 18 to sdk 25.


  private _loadAssetsasync = async () => {
    try {
      await Promise.all([
        Asset.loadAsync(ICONS),
        Font.loadAsync({
          'NotoSans-Italic': require('@assets/fonts/NotoSans-Italic.ttf'),
          'NotoSans-BoldItalic': require('@assets/fonts/NotoSans-BoldItalic.ttf'),
          'NotoSans-Bold': require('@assets/fonts/NotoSansKR-Bold.ttf'),
          'NotoSans-DemiLight': require('@assets/fonts/NotoSansKR-DemiLight.ttf'),
          'NotoSans-Light': require('@assets/fonts/NotoSansKR-Light.ttf'),
          'NotoSans-Medium': require('@assets/fonts/NotoSansKR-Medium.ttf'),
          'NotoSans-Regular': require('@assets/fonts/NotoSansKR-Regular.ttf'),
          'NotoSans-Thin': require('@assets/fonts/NotoSansKR-Thin.ttf'),
        }),
      ]);
    } catch (e) {
      // In this case, you might want to report the error to your error
      // reporting service, for example Sentry
      console.warn(
        'There was an error caching assets (see: App.js), perhaps due to a ' +
          'network timeout, so we skipped caching. Reload the app to try again.',
      );
      console.log(e);
    }
  }
}

However, in sdk 26, it is throwing error

undefined is not an object (evaluating 'moduleIds.map')
- node_modules/expo/src/Asset.js:105:33 in loadAsync
* src/index.tsx:62:8 in _callee$
- node_modules/regenerator-runtime/runtime.js:62:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:296:30 in invoke
- node_modules/tslib/tslib.js:107:17 in <unknown>
- node_modules/promise/setimmediate/core.js:45:7 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:23 in doResolve
- node_modules/promise/setimmediate/core.js:66:12 in Promise
- node_modules/tslib/tslib.js:103:40 in __awaiter
* src/index.tsx:43:14 in _loadAssetsasync
* src/index.tsx:25:4 in componentDidMount
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:10102:12 in commitLifeCycles
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:11472:25 in commitAllLifeCycles
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:39:15 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:221:34 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:11585:32 in commitRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12795:46 in completeRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12745:23 in performWorkOnRoot
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12660:26 in performWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12622:16 in performSyncWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12535:6 in requestWork
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12374:22 in scheduleWorkImpl
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13025:17 in scheduleRootUpdate
- node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13796:35 in render
- node_modules/react-native/Libraries/ReactNative/renderApplication.js:58:21 in renderApplication
- node_modules/react-native/Libraries/ReactNative/AppRegistry.js:196:26 in runApplication
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:353:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:118:26 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:316:6 in __guardSafe
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:117:17 in callFunctionReturnFlushedQueue

Having hard time with this issue, have no idea…

If I remove the above code, it stucks in building javascript 100% in loading screen…

I feel like I can’t upgrade expokit app anymore…


I am debugging my entire project now and found the issue.
import { Platform, StatusBar, StyleSheet, View } from ‘react-native’;

And I found out sometimes those 4 properties are undefined.
When I moved them below the mobx lib I am using, they were no more undefined…
I am digging if there is problem in mobx related to RN 0.54…

Still working…


Finally solved the issue on the javscript side. I’ve been using observer in parent of Provider component which is anti-pattern in using mobx. Therefore, I changed to local state instead of using mobx-store in this component only. This fixed my issue. It was hard to figure out since my code was working fine in expo sdk 25 tough.

So! Now I am left with android upgrade. I will come back if there is any problem.

Thank you for help!


Also, there was breaking changes in fetch api because of RN 0.54 upgrade.
I had to fix this one too.

I am back to tell you that there was no issue in android side. I just finished up the whole upgrade from exp init and detach from a new project. Then I moved all my files to here.

What I really want is not moving my files to new Expo project and linking libraries. I want to upgrade to new expo sdk from my project dir which is very difficult recently from expo sdk 24. I think for ios, it would be working just fine from my project dir but I bet it won’t work in android side which I have to recreate new expo project.

I really need the upgrade guide for expo for existing project. I hope some readme is supported.

Thank you for reading.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.