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

Upgrade packages to versions with Expo SDK support #164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 8, 2023

Automated upgrade of packages to versions that are supported by current version of Expo SDK

@karlhorky
Copy link
Member

Looks like React Native 0.72 is not yet supported in Detox:

I wrote some details about the Android test failure above here (this comment may need to be moved elsewhere, if it's not helpful in this issue):

@karlhorky
Copy link
Member

Maybe it's related to these exceptions:

> Task :app:checkReleaseAndroidTestDuplicateClasses
> Task :app:desugarReleaseAndroidTestFileDependencies
e: file:///Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt:9:33 Unresolved reference: slider

e: file:///Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt:52:50 Unresolved reference: ReactSlider
> Task :detox:compileFullReleaseKotlin
e: file:///Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt:61:42 Unresolved reference: ReactSlider
e: file:///Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt:63:59 Unresolved reference: slider
e: file:///Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt:64:55 Unresolved reference: ReactSlider

> Task :app:compileReleaseArtProfile
> Task :detox:compileFullReleaseKotlin FAILED
> Task :app:mergeExtDexReleaseAndroidTest


FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

Importing this Slider module from React Native:

import com.facebook.react.views.slider.ReactSlider

https://github.com/wix/Detox/blob/2d720514a5f64d7010d386c4e12bf84061bcdaea/detox/android/detox/src/full/java/com/wix/detox/espresso/common/SliderHelper.kt#L9

Looking at the changelog for 0.72, maybe this part is relevant:

@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 3 times, most recently from 502623f to e5ce0e2 Compare August 24, 2023 18:02
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from 5af6677 to ea960c8 Compare September 14, 2023 18:02
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from 6d87675 to 7c2a0bc Compare November 9, 2023 18:03
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from 5b64f10 to c013286 Compare November 30, 2023 18:02
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from afdfd0e to d894e49 Compare December 21, 2023 18:04
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 3 times, most recently from 1c7bc3d to c2af4ec Compare January 26, 2024 11:02
@karlhorky
Copy link
Member

karlhorky commented Jan 26, 2024

The iOS expo prebuild --platform ios command is seemingly having problems with Expo SDK 50 and related packages:

https://github.com/upleveled/hotline-bling-codealong/actions/runs/7673499851/job/20916233166?pr=164

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `ExpoModulesCore` depends upon `glog`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Couldn't install Pods. Updating the Pods project and trying again...
- Couldn't install Pods. Updating the Pods project and trying again...
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `ExpoModulesCore` depends upon `glog`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

pod install --repo-update --ansi exited with non-zero code: 1

Screenshot 2024-01-27 at 11 42 11

Some people suggesting upgrading to macos-13, so I'll try that:

@karlhorky
Copy link
Member

karlhorky commented Jan 26, 2024

New Android failure after upgrading to macos-13:

pnpm expo prebuild --platform android
- Creating native directory (./android)
✔ Created native directory
- Updating package.json
› Using current versions instead of recommended expo@~50.0.4.
- Updating package.json
✔ Updated package.json
- Running prebuild
» android: androidStatusBar.backgroundColor: Color conflicts with the splash.backgroundColor
- Running prebuild
Warning: This command requires version ^2.1.0 of `sharp-cli`. 
- Running prebuild
Currently installed version: "4.2.0" 
Required version: "^2.1.0" 
You can install it using `npm install -g sharp-cli@^2.1.0`. 

For prerequisites, see: https://sharp.dimens.io/en/stable/install/#prerequisites
✖ Prebuild failed
Error: [android.manifest]: withAndroidManifestBaseMod: A runtime version is set in your AndroidManifest.xml, but is missing from your app.json/app.config.js. Please either set runtimeVersion in your app.json/app.config.js or remove expo.modules.updates.EXPO_RUNTIME_VERSION from your AndroidManifest.xml.
Error: [android.manifest]: withAndroidManifestBaseMod: A runtime version is set in your AndroidManifest.xml, but is missing from your app.json/app.config.js. Please either set runtimeVersion in your app.json/app.config.js or remove expo.modules.updates.EXPO_RUNTIME_VERSION from your AndroidManifest.xml.
    at setVersionsConfigAsync (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/android/Updates.js:153:11)
    at async setUpdatesConfigAsync (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/android/Updates.js:147:10)
    at async /Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/android/Updates.js:99:25
    at async action (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:201:[23](https://github.com/upleveled/hotline-bling-codealong/actions/runs/7673950402/job/20917643755?pr=164#step:7:24))
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async interceptingMod (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/withMod.js:105:21)
    at async action (/Users/runner/work/hotline-bling-codealong/hotline-bling-codealong/node_modules/@expo/config-plugins/build/plugins/createBaseMod.js:61:21)

@karlhorky
Copy link
Member

Maybe Detox is also not compatible with React Native 0.73.x:

@karlhorky
Copy link
Member

karlhorky commented Jan 27, 2024

The Swift pod ExpoModulesCore depends upon glog, which does not define modules

The ExpoModulesCore and glog problem was resolved with macos-13.

@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 4 times, most recently from 42f1466 to ea0429f Compare February 2, 2024 11:45
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 5 times, most recently from a3d92cc to 87b9bab Compare February 22, 2024 18:01
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from c365efb to 74e9747 Compare March 7, 2024 18:01
Copy link

socket-security bot commented Mar 14, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/jest@29.7.0, npm/react@18.2.0, npm/typescript@5.5.3

View full report↗︎

@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 3 times, most recently from 981e2fd to 96949c7 Compare March 28, 2024 18:01
@karlhorky karlhorky force-pushed the expo-upgrade-packages branch 2 times, most recently from 240622c to 1795362 Compare May 16, 2024 18:02
Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Install scripts npm/detox@20.23.0
  • Install script: postinstall
  • Source: node scripts/postinstall.js
  • orphan: npm/detox@20.23.0
🚫

View full report↗︎

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/detox@20.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant