Giter VIP home page Giter VIP logo

Comments (6)

r-kohale9 avatar r-kohale9 commented on June 11, 2024

Same here tried upgrading and did not succeed
Ran into the following issue while uploading bundle to play store ->

Your app currently targets API level 28 and must target at least API level 30 to ensure that it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30.

And for the expo to point to API level 30 it requires Expo SDK 41 or higher.

from apollo-universal-starter-kit.

qroac avatar qroac commented on June 11, 2024

Edited by moderator: passive agressive phrase removed.

As mentioned, I already tried to upgrade expo but didn't succeed. That is very unfortunate, because our app is nearly ready for production but - as you stated - cannot be released without upgrading expo.

from apollo-universal-starter-kit.

larixer avatar larixer commented on June 11, 2024

Created Pull Request, which is a work in progress to upgrade to Expo SDK 44:
#1220

from apollo-universal-starter-kit.

qroac avatar qroac commented on June 11, 2024

Well, seems I was wrong about that :)
Glad to see new activity on this project.

I already tried to integrate your changes to our project and came upon some errors I can reproduce on a fresh checkout from your PR branch:

expo version needs to be set in packages/mobile/app.json
add at top level of the json object: "sdkVersion": "44.0.0",

Errors when launching the app in expo go

AppLoading threw an unexpected error when loading:
TypeError: this.props.onFinish is not a function. (In 'this.props.onFinish()', 'this.props.onFinish' is null)

modules/core/client-react-native/AwakeInDevApp.tsx
Change AppLoading props to functions (or maybe just remove them)
return <AppLoading startAsync={() => null} onError={() => null} onFinish={() => null} />;

That still leaves a warning

[Unhandled promise rejection: Error: Downloaded file for asset 'Ionicons.ttf' Located at http://192.168.10.168:19000/assets/../../node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.ttf?platform=android&hash=b2e0fc821c6886fb3940f85a3320003e?platform=android&dev=true&hot=false&minify=false failed MD5 integrity check]

that prevents componentDidMount from completing and setting ready to true.

An error I couldn't fix: lerna likes symlinks and metro does not!
When starting the bundler for building the android app with yarn exp ba, I get the following error:

Building optimized bundles and generating sourcemaps...
Starting Metro Bundler
SHA-1 for file /home/michael/Projekte/JS/apollo-universal-starter-kit/packages/mobile/src (/home/michael/Projekte/JS/apollo-universal-starter-kit/packages/mobile/src) is not computed.
Potential causes:
1) You have symlinks in your project - watchman does not follow symlinks.
2) Check blockList in your metro.config.js and make sure it isn't excluding the file path.

It seems that is a common problem with monorepos, yarn-workspaces/lerna and metro. So far I only found very dirty workarounds by monkey-patching the downloaded metro module and make it follow symlinks.

PS: might occour that expo complains about not being able to refresh the cache file for sdk 44.0.0 in ~/.expo/cache
go to packages/mobile and start expo once with yarn expo start --clear, that creates the cache file.

from apollo-universal-starter-kit.

larixer avatar larixer commented on June 11, 2024

@qroac The most of the work is related to upgrade to the new react-navigation API. I have upgraded all of the modules to the new API, except chat, user and payments, I still work on them. I have pushed another commit with this work.

expo version needs to be set in packages/mobile/app.json
add at top level of the json object: "sdkVersion": "44.0.0",/

Done

modules/core/client-react-native/AwakeInDevApp.tsx
Change AppLoading props to functions (or maybe just remove them)
return <AppLoading startAsync={() => null} onError={() => null} onFinish={() => null} />;

Done, I removed all the props.

That still leaves a warning
[Unhandled promise rejection: Error: Downloaded file for asset 'Ionicons.ttf' Located at http://192.168.10.168:19000/assets/../../node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.ttf?platform=android&hash=b2e0fc821c6886fb3940f85a3320003e?platform=android&dev=true&hot=false&minify=false failed MD5 integrity check]

Strangely I don't have that, maybe try to Hardware -> Erase All Content and Settings in the Simulator and find . -name node_modules | xargs rm -rf, then yarn and then restart?

It seems that is a common problem with monorepos, yarn-workspaces/lerna and metro. So far I only found very dirty workarounds by monkey-patching the downloaded metro module and make it follow symlinks.

Don't worry, starting from Expo SDK 43, Expo supports monorepos natively, so I have removed yarn-expo-workspaces dependencies which changed directories inside node_modules, now they stay untouched after yarn and this is a very good thing, but maybe you need to find . -name node_modules | xargs rm -rf, e.g. kill all node_modules folder and run yarn again to clean things up one last time

As for the user module, I think the properties that we put into userInfo for each screen previously should be instead put into initialParams of the screen and taken from route.params inside components to be in line with new react-navigation API, I'm working on this one.

from apollo-universal-starter-kit.

qroac avatar qroac commented on June 11, 2024

Btw. I also had a problem installing hard-source-webpack-plugin and watchpack because of failing checksums.
Deleting their checksums from yarn2.lock made yarn install work.

As mentioned, I worked with a fresh clone from the PR branch.
So there shouldn't be any old build files or previous built modules.
I tried deleting all node_modules and installing with yarn again, the warning remains.
And so does the error from metro when starting an android build.

EDIT:
I just checked: there are still symlinks created in node_modules, for the main packages:

$ ls -la node_modules/ |grep ^l
lrwxrwxrwx 1 michael michael 18 Feb 2 13:29 client -> ../packages/client
lrwxrwxrwx 1 michael michael 26 Feb 2 13:29 client-angular -> ../packages/client-angular
lrwxrwxrwx 1 michael michael 22 Feb 2 13:29 client-vue -> ../packages/client-vue
lrwxrwxrwx 1 michael michael 18 Feb 2 13:29 common -> ../packages/common
lrwxrwxrwx 1 michael michael 18 Feb 2 13:29 mobile -> ../packages/mobile
lrwxrwxrwx 1 michael michael 18 Feb 2 13:29 server -> ../packages/server

My environment:

  • Linux x64, Ubuntu 20.04 / Tuxedo_OS
  • node 12.19.0 (from nvm)
  • expo go on Samsung S21 over wifi (no simulator)
    added a new watch:mobile to package.json because start now fails if there is no device connected
    "watch:mobile": "npm-run-all --parallel watch-server watch-mobile",
    "watch-mobile": "yarn workspace mobile watch",
    

from apollo-universal-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.