cortinico

cortinico

Maintainer of Detekt, Chucker, AppIntro 🐧 - Host @ thebakery.dev 🎙 - He/Him 🏳️‍🌈 【ツ】

Member Since 9 years ago

London, UK

Experience Points
827
follower
Lessons Completed
96
follow
Lessons Completed
172
stars
Best Reply Awards
102
repos

1822 contributions in the last year

Pinned
⚡ Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️
⚡ A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
⚡ Static code analysis for Kotlin
⚡ 🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
⚡ Make a cool intro for your Android app.
⚡ 💫 A Gradle Plugin to generate your networking code from Swagger
Activity
Jan
18
22 hours ago
pull request

cortinico merge to facebook/react-native

cortinico
cortinico

fix(deps): update `jscodeshift`

Summary

This will include https://github.com/facebook/jscodeshift/pull/473, which will fix the problems with the colors package (see https://github.com/facebook/jscodeshift/issues/474)

Changelog

[Internal] [Security] - update jscodeshift

Test Plan

N/A

cortinico
cortinico

Change looks fine but it's failing internally. I need to look into it. So it might take a bit longer for this to merge.

Activity icon
issue

cortinico issue comment facebook/react-native-website

cortinico
cortinico

Document how React is upgraded in React Native

Upgrading React in React Native is a multi-step process that requires re-building the renderer, among other things. This is not clear to folks using React Native (see https://github.com/react-native-community/discussions-and-proposals/issues/88). Let's document somewhere that upgrading React yourself is not encouraged.

We have a similar situation with dependencies like Flow. Flow needs to be upgraded across all of Facebook, and PRs that bump Flow will not be accepted in the main repo.

cortinico
cortinico

(I think we can close it tbh)

Do we have it documented somewhere or why this has changed?

Activity icon
issue

cortinico issue comment getsentry/sentry-android-gradle-plugin

cortinico
cortinico

Support DexGuard

The Sentry Gradle Plugin currently supports ProGuard and R8 but fails to find DexGuard Gradle's tasks.

The tasks have a different prefix name, we'd need to look up for them too as we do for ProGuard and R8

See: https://github.com/getsentry/sentry-android-gradle-plugin/blob/master/src/main/groovy/io/sentry/android/gradle/SentryPlugin.groovy#L139-L142

https://www.guardsquare.com/en/products/proguard/manual/gradleplugin

cortinico
cortinico

@cortinico thanks a bunch, do you have access to dexguard to test it out though?

Nope, I've been testing with the standalone Proguard setup suggested here https://www.guardsquare.com/manual/setup/gradleplugin

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

[Releases] Auto-label pull requests on release branches to have "Pick Request"

I looked into whether we can do this via react-native-bot but it seems like the candidates for the bot is based on Github search: https://github.com/hramos/react-native-bot/blob/master/lib/bot/pullrequests.rb#L48

So I think this might need to be a Github action.

Release branches should follow the form: {major}.{minor}-stable

cortinico
cortinico

@lunaleaps would it be fine to use something like github.com/marketplace/actions/label-regex or would it be necessary developing a custom action for this?

My 2 cents here: this can be easily implemented in Danger. We already have a dangerfile here https://github.com/facebook/react-native/blob/main/bots/dangerfile.js with Danger already configured. We would just need to add a rule that checks if base branch != main -> apply the Pick Request label.

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

Could not determine the dependencies of task ':app:lintVitalRelease'.

Description

  • What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'. Could not find com.nicepeopleatwork:exoplayer-adapter:6.7.22. Searched in the following locations: - file:/Users/andresgonzalez/.m2/repository/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://dl.google.com/dl/android/maven2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://plugins.gradle.org/m2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/public/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/releases/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/snapshots/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/react-native/android/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/jsc-android/dist/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://repo.maven.apache.org/maven2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://www.jitpack.io/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/rn-qp-nxg-player/generated/exoplayer-adapter-6.7.22.jar - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/rn-qp-nxg-player/generated/exoplayer-adapter.jar Required by: project :app > project :rn-qp-nxg-player

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

I already tried adding to my build.gradle (android/app) the following but still not working:

lintOptions { checkReleaseBuilds false abortOnError false }

Version

react-native-cli: 2.0.1 react-native: 0.66.3-0

Output of npx react-native info

System: OS: macOS 12.1 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @2.20GHz Memory: 26.34 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm Watchman: 2022.01.17.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 28, 29, 30, 32 Build Tools: 28.0.3, 29.0.2, 30.0.3 System Images: android-29 | Android TV Intel x86 Atom, android-29 | ARM 64 v8a, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs ARM 64 v8a, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play ARM 64 v8a, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /Users/andresgonzalez/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.66.3-0 npmGlobalPackages: react-native: Not Found

Steps to reproduce

I first started using Node 14, then npm install and change to my android directory. Once inside android directory run ./gradlew assembleRelease.

Snack, code example, screenshot, or link to a repository

No response

cortinico
cortinico

Could not find com.nicepeopleatwork:exoplayer-adapter:6.7.22.

That's the root cause of your problem. Your build can't find com.nicepeopleatwork:exoplayer-adapter. I've done a quick search and also I can't say where this package is supposed to be hosted (couldn't find it on Maven Central).

Closing as this is unrelated to React Native per se, but is a failure caused by a 3rd party package.

Activity icon
issue

cortinico issue facebook/react-native

cortinico
cortinico

Could not determine the dependencies of task ':app:lintVitalRelease'.

Description

  • What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'. Could not find com.nicepeopleatwork:exoplayer-adapter:6.7.22. Searched in the following locations: - file:/Users/andresgonzalez/.m2/repository/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://dl.google.com/dl/android/maven2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://plugins.gradle.org/m2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/public/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/releases/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - http://maven.quickplay.local/nexus/content/repositories/snapshots/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/react-native/android/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/jsc-android/dist/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://repo.maven.apache.org/maven2/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - https://www.jitpack.io/com/nicepeopleatwork/exoplayer-adapter/6.7.22/exoplayer-adapter-6.7.22.pom - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/rn-qp-nxg-player/generated/exoplayer-adapter-6.7.22.jar - file:/Users/andresgonzalez/Documents/pldt-rn-ui/node_modules/rn-qp-nxg-player/generated/exoplayer-adapter.jar Required by: project :app > project :rn-qp-nxg-player

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

I already tried adding to my build.gradle (android/app) the following but still not working:

lintOptions { checkReleaseBuilds false abortOnError false }

Version

react-native-cli: 2.0.1 react-native: 0.66.3-0

Output of npx react-native info

System: OS: macOS 12.1 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @2.20GHz Memory: 26.34 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.3 - ~/.nvm/versions/node/v14.18.3/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 6.14.15 - ~/.nvm/versions/node/v14.18.3/bin/npm Watchman: 2022.01.17.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 28, 29, 30, 32 Build Tools: 28.0.3, 29.0.2, 30.0.3 System Images: android-29 | Android TV Intel x86 Atom, android-29 | ARM 64 v8a, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs ARM 64 v8a, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play ARM 64 v8a, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7935034 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /Users/andresgonzalez/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.66.3-0 npmGlobalPackages: react-native: Not Found

Steps to reproduce

I first started using Node 14, then npm install and change to my android directory. Once inside android directory run ./gradlew assembleRelease.

Snack, code example, screenshot, or link to a repository

No response

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

Help with Bug, error message -> ReferenceError: Can't find variable: document

Description

I'm trying to run my project but getting this error: . I tried searching the whole folder but can't find any use of document. What is causing this issue?

Version

0.63.2

Output of npx react-native info

System: OS: macOS 12.1 CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @1.60GHz Memory: 2.61 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.2.0 - /usr/local/bin/node Yarn: 1.22.0 - /usr/local/bin/yarn npm: 7.13.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: Not Found Python: 2.7.18 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

N/A

Snack, code example, screenshot, or link to a repository

No response

cortinico
cortinico

I'm trying to run my project but getting this error: . I tried searching the whole folder but can't find any use of document. What is causing this issue?

What is the error message? Where are you seeing it? Could you provide a reproducer?

pull request

cortinico merge to ChuckerTeam/chucker

cortinico
cortinico

Bump constraintlayout from 2.1.2 to 2.1.3

Bumps constraintlayout from 2.1.2 to 2.1.3.

Release notes

Sourced from constraintlayout's releases.

2.1.3

Point release of the constraintlayout library.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Activity icon
issue

cortinico issue comment getsentry/sentry-android-gradle-plugin

cortinico
cortinico

Support DexGuard

The Sentry Gradle Plugin currently supports ProGuard and R8 but fails to find DexGuard Gradle's tasks.

The tasks have a different prefix name, we'd need to look up for them too as we do for ProGuard and R8

See: https://github.com/getsentry/sentry-android-gradle-plugin/blob/master/src/main/groovy/io/sentry/android/gradle/SentryPlugin.groovy#L139-L142

https://www.guardsquare.com/en/products/proguard/manual/gradleplugin

cortinico
cortinico

Just a heads up, I started working on this one. The implementation is not yet completed but I hope to be able to share a PR in 1/2 weeks 👍

pull request

cortinico pull request FOSDEM/website

cortinico
cortinico

Update Kotlin DevRoom description for 2022

push

cortinico push cortinico/website

cortinico
cortinico

Add a note about KMM and Jetpack Compose

commit sha: 8a2c57e4b02e48ac71ea014b9a1b798d4a13a410

push time in 13 hours ago
push

cortinico push cortinico/website

cortinico
cortinico

Update Kotlin DevRoom description for 2022

commit sha: 308dbd1b66fa9b41eea0bf8f7569b569001338c3

push time in 13 hours ago
Jan
17
1 day ago
Activity icon
issue

cortinico issue comment detekt/detekt

cortinico
cortinico

Move to versioned documentation

Expected Behavior

Config shouldn't complete with error with correct fields.

Observed Behavior

Config validator completes with error. The errors inform about misspelled or not existed fields, although they are correct according to the documentation. At the same time correctness of fields with config validation turned off has been proved.

Steps to Reproduce

Add default fields fo rules listed below and turn on config validation. LongParameterList: excludes: *daggerClasses active: true functionThreshold: 4 constructorThreshold: 7 ignoreDefaultParameters: true ignoreDataClasses: true ignoreAnnotatedParameter: [ ] <-- default value

UnderscoresInNumericLiterals: active: false acceptableLength: 5 <-- default value

Context

Turning on config validation after detekt plugin version update

Your Environment

  • Version of detekt used: 1.18.1
  • Version of Gradle used (if applicable): 6.8.3
cortinico
cortinico

This is still a thing. I'm actually looking into it 👍

Activity icon
created tag
createdAt 1 day ago
Activity icon
published release AppIntro 6.2.0

cortinico in AppIntro/AppIntro create published release AppIntro 6.2.0

createdAt 1 day ago
Activity icon
issue

cortinico issue comment expo/expo

cortinico
cortinico

JCenter is decommissioning May 1, 2021. Replace with MavenCentral repo.

Summary

JCenter is being decommissioned in 6 weeks. Gradle repositories should be replaced with Maven Central sources.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

Android, iOS, Web

SDK Version (managed workflow only)

No response

Environment

Expo CLI 4.1.6 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.15.5 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD npmPackages: expo: ^40.0.1 => 40.0.1 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 Expo Workflow: bare

Reproducible demo or steps to reproduce from a blank project

This will not be reproducible until May 1, 2021 when JCenter requests begin failing. We should transition before this happens.

JCenter is being decommissioned in 6 weeks. Gradle repositories should be replaced with Maven Central sources. Flipper has already begun its transition.

cortinico
cortinico

Have I got this right? If so, best of luck getting them mirrored :)

That's correct. The specific package, exoplayer, is hosted on Google Maven repo and available there since version 2.13.3: https://maven.google.com/web/index.html?q=exoplay#com.google.android.exoplayer:exoplayer

Yes, it's feasible to ask companies to re-upload older version of artifacts to other repos (being them MavenCentral or Google Maven repo), but that takes time and effort and should not be the preferred solution IMHO.

Updating versions (i.e. the Expo SDK version) is way faster than trying to convince library authors to re-upload older artifacts to other repos.

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

Android: empty white screen after BundleDownloader failure

Description

In development mode on Android, if the app has no JS bundle and no fallback available, the app displays a RedBox error saying either Unable to load script. or Could not connect to development server.. If the user resolves this issue and chooses Reload, the app will then successfully download the bundle from Metro, but will not actually initialize the application. Instead, the app simply shows a blank white screen.

Here's the series of steps that causes this to happen:

  1. runCreateReactContextOnNewThread is called as part of normal React Native initialization
  2. The mCreateReactContextThread thread is created and started
  3. Since no bundle is available, the thread exits early because createReactContext throws an exception; this is what triggers the RedBox
  4. The user starts Metro and taps Reload, which causes BundleDownloader to download the bundle
  5. BundleDownloader's onSuccess callback calls recreateReactContextInBackground
  6. recreateReactContextInBackground sees that mCreateReactContextThread was already set earlier, and thus sets mPendingReactContextInitParams
  7. The newly set mPendingReactContextInitParams is never used and the app sits idle

I have a proposed fix that I'll send a PR for.

Version

0.66.4

Output of npx react-native info

System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 573.08 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
    npm: 8.3.0 - ~/.nvm/versions/node/v16.13.1/bin/npm
    Watchman: 2022.01.03.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /Users/samkline/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      Android NDK: 20.1.5948944
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7935034
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.4 => 0.66.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Stop any locally running Metro service
  2. Start a new project with npx react-native init
  3. Run yarn android to build and launch the app in your emulator
  4. Wait until you see the RedBox error
  5. Run yarn start
  6. In the app, tap Reload to load the bundle from Metro
  7. The app loads the bundle from Metro, then leaves you at a blank white screen

Snack, code example, screenshot, or link to a repository

No response

cortinico
cortinico

In development mode on Android, if the app has no JS bundle and no fallback available, the app displays a RedBox error saying either Unable to load script. or Could not connect to development server.. If the user resolves this issue and chooses Reload, the app will then successfully download the bundle from Metro, but will not actually initialize the application. Instead, the app simply shows a blank white screen.

Thanks for looking into this @samkline, it's great stuff! I've noticed this same behavior and I had this in my backlog to investigate. Glad you found the time to do it. I'll give it a try in the next days as there are a couple of scenarios I'd like to test, but on a first look the PR looks fine to me.

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

fix: KeyboardAvoidingView _updateBottomIfNecessary typo

Summary

While working on a fix for https://github.com/facebook/react-native/issues/29974 I notice that the _updateBottomIfNecessary function inside KeyboardAvoidingView was misspelled, so I decided to open a PR fixing it.

Changelog

[General] [Fixed] - Fix typo in _updateBottomIfNecessary function on KeyboardAvoidingView component

Test Plan

Shouldn't require much testing as this is just renaming a private function of KeyboardAvoidingView

cortinico
cortinico

@cortinico I see that the Facebook Internal - Builds & Tests check says Action required after 39m, is there something that I need to do? Not sure why this would fail

That's actually an internal test that is flaky and is being reported as a failure. We should be good to go merging as it is.

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

Could not resolve org.webkit:android-jsc:+. when building and installing for android

Description

I am getting this error "Could not resolve org.webkit:android-jsc:+." when trying to run "npm run android" this morning. It was working on Friday. Full detail below:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve org.webkit:android-jsc:+.
     Required by:
         project :app
      > Failed to list versions for org.webkit:android-jsc.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml.
            > Could not HEAD 'https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml'.
               > Read timed out

I started a new project from scratch using npx react-native init AwesomeProject it failed with same error.

I have another project on older version of RN at 0.63.2, which can build as expected. These ones which are having issues are on 0.63.4 and 0.64.0

Seems like remote artifact repo is down to me..

React Native version:

Run react-native info in your terminal and copy the results here.

System: OS: macOS 10.15.7 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @2.30GHz Memory: 33.99 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.15.0 - ~/.nvm/versions/node/v12.15.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.10 - ~/.nvm/versions/node/v12.15.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: Not Found SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild Languages: Java: 11.0.6 - /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. npm run android

Expected Results

Describe what you expected to happen.

It should build correctly without the issue.

cortinico
cortinico

Hey all, May I kindly ask you to stop posting same issue messages without providing solution as that's just generating notifications/emails for people subscribed to this project/issue.

Back to the issue: It seems like JCenter is really slow to respond at the moment. It can be verified locally with:

wget https://jcenter.bintray.com/org/webkit/android-jsc/maven-metadata.xml

The command should take seconds. It's failing with 504 or generally taking ~3 minutes for me to return a 200 sometimes.

If you're on React Native 0.65.x and subsequent versions, you should not be affected by this as we removed jcenter() from the repository block in that version. Instead if you're on the latest Expo SDK, which relies on RN 0.64.x, you're most likely affected this.

Please also note that, if you're build is failing as you're try do download org.webkit:android-jsc:+ from JCenter, that specific dependency is available to be consumed on Maven Central: https://search.maven.org/artifact/org.webkit/android-jsc/r174650/aar

Please check the answer we provided here: https://github.com/react-native-community/discussions-and-proposals/issues/331#issuecomment-1013339743 as this clarifies a bit the scope of the problem.

As possible solutions to unblock you, I would suggest to:

  1. (recommended) Migrate to latest version of RN and generally update your dependencies.
  2. Try to apply the workaround suggested by @ShikaSD here https://github.com/facebook/react-native/issues/32734#issuecomment-1013431238
  3. Try to manually update all the jcenter() instance in your build.gradle file to use mavenCentral instead. Please note that you will also have to edit files inside node_modules, so your edits will be lost if you npm/yarn install. Moreover, we're aware of some older dependencies being available only on JCenter (the one listed by @ShikaSD in the point 2. I mentioned), so just updating jcenter() -> mavenCentral() might just not work as it is. A command to update your build.gradle file automatically would be:
    1. For MacOS: find . -type f \( -name "*.gradle" -o -name "*.gradle.kts" \) -exec sed -i '' 's/jcenter/mavenCentral/g' {} +
    2. For Linux: find . -type f \( -name "*.gradle" -o -name "*.gradle.kts" \) -exec sed -i 's/jcenter/mavenCentral/g' {} +
    3. For Windows: I don't have a win manchine at the moment, but I'm happy to edit this message should someone have a command for win to share.
pull request

cortinico merge to facebook/react-native

cortinico
cortinico

chore(deps): update `jscodeshift`

Summary

This will include https://github.com/facebook/jscodeshift/pull/473, which will fix the problems with the colors package (see https://github.com/facebook/jscodeshift/issues/474)

Changelog

[Internal] [Security] - update jscodeshift

Test Plan

N/A

cortinico
cortinico

Thank you for doing this @MichaelDeBoey Don't you mind running a yarn install to rebuild the lockfile?

open pull request

cortinico wants to merge getsentry/sentry-android-gradle-plugin

cortinico
cortinico

feat: Add benchmark script to measure build speed with and w/o SAGP

#skip-changelog

cortinico
cortinico

but then I'd need to determine the latest version somehow, whereas sdkman does it for me. Do you know how to do that with wget?

If you wish to get the latest version, you'll have to get it from here: https://repo.gradle.org/ui/native/ext-releases-local/org/gradle/profiler/gradle-profiler/maven-metadata.xml which is potentially far from ideal.

However, I'll advise against using unpinned versions (e.g. with sdkman) as things can change as new version of gradle-profiler are released and they'll end up being unnoticed in the CI.

On the other hand, having a fixed version (either with a wget or with sdk install gradleprofiler <version>) will allow you to exclude this variability.

pull request

cortinico merge to getsentry/sentry-android-gradle-plugin

cortinico
cortinico

feat: Add benchmark script to measure build speed with and w/o SAGP

#skip-changelog

Activity icon
delete

cortinico in AppIntro/AppIntro delete branch nc/prepare-6.2

deleted time in 1 day ago
pull request

cortinico pull request AppIntro/AppIntro

cortinico
cortinico

Prepare release 6.2.0

Time to prepare a new release 🎉 Here the release notes

open pull request

cortinico wants to merge facebook/react-native-website

cortinico
cortinico

Linking.canOpenURL returing false for https URLs

Linking.canOpenURL(url) was returning false with Android 11 (SDK 30) even with the above queries section in AndrpidManifest.xml. To fix it I had to add android:host="*" to the data tag.

cortinico
cortinico

as I want to be able to open any link with the external browser not only one specific domain

Could you please elaborate? Is this specific to your use case?

pull request

cortinico merge to facebook/react-native-website

cortinico
cortinico

Linking.canOpenURL returing false for https URLs

Linking.canOpenURL(url) was returning false with Android 11 (SDK 30) even with the above queries section in AndrpidManifest.xml. To fix it I had to add android:host="*" to the data tag.

Activity icon
issue

cortinico issue facebook/react-native

cortinico
cortinico

Can not download template with npx react-native init when creating a new app

Description

I've install the environment described here: https://reactnative.dev/docs/environment-setup

but when I run npx react-native init AwesomeTSProject --template react-native-template-typescript I got this error:

✖ Downloading template
error Error: Command failed: yarn init -y
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
warning ..\..\..\..\package.json: No license field
error An unexpected error occurred: "Cannot create property 'org' on string ''".
yarn init v1.22.17
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\ASUS\\AppData\\Local\\Temp\\rncli-init-template-ncXdhF\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/init for documentation about this command.

Version

6.3.1

Output of react-native info

System: OS: Windows 10 10.0.19043 CPU: (8) x64 Intel(R) Core(TM) i7-4710HQ CPU @2.50GHz Memory: 4.49 GB / 15.95 GB Binaries: Node: 14.15.4 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 7.20.1 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 27, 28, 29 Build Tools: 28.0.3, 29.0.3, 32.0.0 System Images: android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7935034 Visual Studio: Not Found Languages: Java: 11.0.2 - C:\Users\ASUS\AppData\Local\jdk-11.0.2\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  • run: npx react-native init AwesomeTSProject --template react-native-template-typescript, it only create an empty directory "AwesomeTSProject"

Snack, code example, screenshot, or link to a repository

No response

Activity icon
issue

cortinico issue comment facebook/react-native

cortinico
cortinico

Can not download template with npx react-native init when creating a new app

Description

I've install the environment described here: https://reactnative.dev/docs/environment-setup

but when I run npx react-native init AwesomeTSProject --template react-native-template-typescript I got this error:

✖ Downloading template
error Error: Command failed: yarn init -y
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
warning ..\..\..\..\package.json: No license field
error An unexpected error occurred: "Cannot create property 'org' on string ''".
yarn init v1.22.17
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\ASUS\\AppData\\Local\\Temp\\rncli-init-template-ncXdhF\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/init for documentation about this command.

Version

6.3.1

Output of react-native info

System: OS: Windows 10 10.0.19043 CPU: (8) x64 Intel(R) Core(TM) i7-4710HQ CPU @2.50GHz Memory: 4.49 GB / 15.95 GB Binaries: Node: 14.15.4 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 7.20.1 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 27, 28, 29 Build Tools: 28.0.3, 29.0.3, 32.0.0 System Images: android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7935034 Visual Studio: Not Found Languages: Java: 11.0.2 - C:\Users\ASUS\AppData\Local\jdk-11.0.2\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  • run: npx react-native init AwesomeTSProject --template react-native-template-typescript, it only create an empty directory "AwesomeTSProject"

Snack, code example, screenshot, or link to a repository

No response

cortinico
cortinico

@tiavina-mika You should ideally open an issue on https://github.com/react-native-community/react-native-template-typescript/ as it seems like it's a problem related to that specific template.

Closing as I believe is not directly related to RN, but feel free to reopen if this is not the case.

And react-native info doesn't work:

@alexindigo That's unrelated to this problem, but you're most likely running an older version of react-native that you installed globally. You can check it with: npm info react-native version

Previous