Issue Description
tns apple-login fails with sms verification
$ tns apple-login
✔ Apple ID … me#example.com
✔ Apple ID password … ************
✔ Please enter the 6 digit code … 955316
Request failed with status code 400
Reproduction
use tns apple-login command from macbook air.
Relevant log output (if applicable)
No response
Environment
$ npm i -D nativescript-envinfo
added 2 packages, and audited 454 packages in 2s
50 packages are looking for funding
run npm fund for details
2 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run npm audit for details.
➜ calmness-mobile git:(main) ✗
$ npx nativescript-envinfo
OS: macOS 12.6.3
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU # 1.80GHz
Shell: /bin/zsh
node: 16.17.0
npm: 8.15.0
nativescript: 8.3.3
# android
java: Not Found
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
# ios
xcode: 13.4.1/13F100
cocoapods: 1.11.3
python: 3.10.6
python3: 3.10.6
ruby: 2.7.6
platforms:
- DriverKit 21.4
- iOS 15.5
- macOS 12.3
- tvOS 15.4
- watchOS 8.5
Dependencies
"dependencies": {
"#nativescript/core": "~8.1.3",
"#nativescript/theme": "^3.0.2",
"#triniwiz/nativescript-couchbase": "^1.3.1",
"#triniwiz/nativescript-image-cache-it": "^7.0.21",
"#triniwiz/nativescript-toasty": "^4.1.3",
"nativescript-audio": "^6.2.6",
"nativescript-platform-free": "^1.3.2",
"svelte-gestures": "^1.4.1",
"svelte-native": "~1.0.5"
},
"devDependencies": {
"#nativescript/android": "^8.4.0",
"#nativescript/ios": "^8.3.3",
"#nativescript/preview-cli": "^1.0.0-beta.18",
"#nativescript/types": "^8.3.0",
"#nativescript/webpack": "^5.0.6",
"nativescript-envinfo": "^1.0.9",
"svelte": "~3.44.0",
"svelte-loader": "^3.1.2",
"svelte-native-preprocessor": "^1.0.0",
"svelte-preprocess": "^4.7.0",
"typescript": "^4.5.5"
}
https://v7.docs.nativescript.org/tooling/docs-cli/publishing/appstore-upload.html
Related
I am using CircleCI to build for iOS (and Android) and recently, the iOS build fails with these error messages:
Compiling RNSentry.m
❌ /Users/distiller/project/node_modules/#sentry/react-native/ios/RNSentry.m:107:79: property 'options' not found on object of type 'PrivateSentrySDKOnly'
if (appIsActive && !sentHybridSdkDidBecomeActive && (PrivateSentrySDKOnly.options.enableAutoSessionTracking || PrivateSentrySDKOnly.options.enableOutOfMemoryTracking)) {
^
❌ /Users/distiller/project/node_modules/#sentry/react-native/ios/RNSentry.m:107:137: property 'options' not found on object of type 'PrivateSentrySDKOnly'
if (appIsActive && !sentHybridSdkDidBecomeActive && (PrivateSentrySDKOnly.options.enableAutoSessionTracking || PrivateSentrySDKOnly.options.enableOutOfMemoryTracking)) {
^
❌ /Users/distiller/project/node_modules/#sentry/react-native/ios/RNSentry.m:155:39: property 'getSdkName' not found on object of type 'PrivateSentrySDKOnly'
#"name": PrivateSentrySDKOnly.getSdkName,
^
❌ /Users/distiller/project/node_modules/#sentry/react-native/ios/RNSentry.m:195:34: property 'options' not found on object of type 'PrivateSentrySDKOnly'
if (PrivateSentrySDKOnly.options.debug
It has once worked to build for iOS, and I think this has something to do with the version of Sentry; I think I tried to update the Sentry version to 4.9.0, only to find that 4.9.0 has some serious issues (I think). I am not smart enough to dechiffer exactly what the conclusions here are, but I think it relates:
https://github.com/getsentry/sentry-cocoa/issues/1665
https://github.com/getsentry/sentry-react-native/issues/2530
(I was looking for another URL that related, but cant find now)
Android works to build with the configs and whatnot, but iOS fails. I am not sure what do to do resolve this, and I would like some input =)
the package.json has Sentry 4.8.0:
"dependencies": {
"#react-native-async-storage/async-storage": "^1.17.4",
"#react-native-community/cli-platform-android": "^6.3.0",
"#sentry/react-native": "4.8.0",
"#turf/distance": "^6.0.1",
"axios": "^1.1.1",
"dotenv": "^16.0.0",
"eventing-bus": "^2.0.1",
"jetifier": "^2.0.0",
"lodash": "^4.17.15",
"moment": "^2.29.3",
"moment-timezone": "^0.5.34",
"patch-package": "^6.4.7",
"react": "17.0.2",
"react-native": "0.67.4",
Here is the rest of my config/setup:
PS C:\Github\alfaonlinev3> npx react-native doctor
Common
✓ Node.js
✓ yarn
Android
✓ JDK
✖ Android Studio - Required for building and installing your app on Android
✓ Android SDK - Required for building and installing your app on Android
✓ ANDROID_HOME
Errors: 1
Warnings: 0
Note: I have Android Studio installed, and it is working for Android native project. No idea why doctor complains or how to resolve it, other than downloading another copy of Android studio?
envinfo:
Visual Studio code: 1.73.1
System:
OS: Windows 10 10.0.19044
CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
Memory: 5.01 GB / 31.95 GB
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
Managers:
pip2: 19.2.3 - C:\Python27\Scripts\pip2.EXE
pip3: 21.1.1 - C:\Python39\Scripts\pip3.EXE
Utilities:
Git: 2.34.1.
SDKs:
Android SDK:
API Levels: 28, 29, 30, 31, 33
Build Tools: 28.0.3, 29.0.0, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
IDEs:
VSCode: 1.73.1 - C:\Program Files\Microsoft VS Code\bin\code.CMD
Visual Studio: 17.3.32519.111 (Visual Studio Community 2022), 16.11.32106.194 (Visual Studio Community 2019)
Languages:
Java: 19.0.1
Python: 3.9.5
Databases:
SQLite: 3.32.2 - C:\Users\wagge\AppData\Local\Android\Sdk\platform-tools\sqlite3.EXE
Browsers:
Chrome: 107.0.5304.121
Edge: Spartan (44.19041.1266.0), Chromium (107.0.1418.56)
Internet Explorer: 11.0.19041.1566
IDEs:
Android Studio: Not Found
Visual Studio: 17.3.32519.111 (Visual Studio Community 2022), 16.11.32106.194 (Visual Studio Community 2019)
Languages:
Java: 19.0.1
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.4 => 0.67.4
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
UPDATE
I ran npm-update, it suggested updating sentry to 4.10.1. After that was done, I see this change in package.json:
also yarn.lock
but still, the builds fails with the same error.
UPDATE 2
I check podfile.* and I see stuff like:
podfile.lock:
- RNSentry (3.4.2):
- React-Core
- Sentry (= 7.11.0)
- RNSnackbar (2.4.0):
- React-Core
- RNSVG (9.13.6):
- React
- Sentry (7.11.0):
- Sentry/Core (= 7.11.0)
- Sentry/Core (7.11.0)
The file podfile does not contain "sentry" at all.
Looks like it is your problem:
https://github.com/getsentry/sentry-react-native/pull/2599/files
Try to upgrade react native sentry to 4.10.1
From your podfile.lock it looks like you have an old version of the RNSentry pod installed.
- RNSentry (3.4.2):
Try to run the following:
cd ios
pod update RNSentry
The RNSentry must be the same version as #sentry/react-native. So in your case it should've been 4.10.1.
I just upgrade React-native from 0.62.2 to 0.63.4, and get this error. It is not clear from which library or module exactly it gave the error.Many people have encountered an error due to this react-native-push-notification library, but I could not find any error related to this react-native-push-notification library in any log. a library that I do not use in the project and is not installed
[[And I noticed another strange thing. In react native 0.63 and above, the error is that the screen should have changed (So LogBox should be displayed) but as you can see this annoying red black screen is still displayed]]- it's not a big deal but i was just wondering why
i updated everything in the upgrade helper
https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.4
System:
OS: macOS 11.3.1
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU # 2.60GHz
Memory: 134.73 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.2.0 - /usr/local/bin/node
Yarn: Not Found
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/ibrahimyolbir/.rvm/gems/ruby-2.7.1/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6241897
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: javac 16 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: ^16.13.1 => 16.14.0
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.
❯ pod deintegrate && pod cache clean --all
❯ pod install
❯ reinstall node_modules
❯ clean project
❯ reopen xcode
I am setting up IOS dev for React Native (0.61) app which has the working android version. What I did was to copy src of components and package.json file after react native environment is setup by following online post (installed xcode command line tool 10.2). But launching run-ios failed:
$ react-native run-ios
error Could not find "Podfile.lock" at /Users/mine/Documents/code/js/emps_fe6/ios/Podfile.lock. Did you run "pod install" in iOS directory?
error Could not find the following native modules: RNCAsyncStorage, RNDeviceInfo, RNGestureHandler, RNKeychain, BVLinearGradient, RNLocalize, RNReanimated, RNVectorIcons, react-native-video. Did you forget to run "pod install" ?
info Found Xcode project "emps_fe6.xcodeproj"
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
error Could not parse the simulator list output. Run CLI with --verbose flag for more details.
Error: Command failed: xcrun simctl list --json devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
at checkExecSyncError (child_process.js:629:11)
at Object.execFileSync (child_process.js:647:13)
at runOnSimulator (/Usersamine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:130:54)
at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:100:12)
at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli/build/index.js:164:23)
at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)
at Command.emit (events.js:198:13)
at Command.parseArgs (/Users/amine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)
at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)
at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli/build/index.js:237:24)
Here is the output of react native info:
$ react-native info
info Fetching system and libraries information...
System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-2675QM CPU # 2.20GHz
Memory: 194.93 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.17.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
IDEs:
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.11.0 => 16.11.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
Here is the package.json:
"dependencies": {
"#react-native-community/async-storage": "^1.6.2",
"moment": "^2.24.0",
"react": "16.11.0",
"react-native": "0.61.2",
"react-native-cli": "^2.0.1",
"react-native-confirmation-code-field": "^4.1.0",
"react-native-device-info": "^4.0.1",
"react-native-elements": "^1.2.6",
"react-native-gesture-handler": "^1.4.1",
"react-native-gifted-chat": "^0.11.3",
"react-native-keychain": "^4.0.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.3.1",
"react-native-modal": "^11.4.0",
"react-native-modal-datetime-picker": "^7.6.0",
"react-native-reanimated": "^1.3.0",
"react-native-segmented-control-tab": "^3.4.1",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "^5.0.2",
"react-navigation": "^4.0.10",
"react-navigation-stack": "^1.10.2",
"react-navigation-tabs": "^2.5.6",
"simctl": "^2.0.0",
"socket.io-client": "2.1.1",
"xcode": "^2.0.0"
},
In the error message, there mentioned quite a few modules which are missing. But those modules have been installed as it shows in the package.json. I am not sure about what the error message means. Also I installed the simctl but scrum simctl still can not find it. I am using VS Code as IDE.
UPDATE:
created an empty Podfile.lock under /ios, the error becomes when run-ios:
error Cannot read property 'SPEC CHECKSUMS' of undefined. Run CLI with --verbose flag for more details.
TypeError: Cannot read property 'SPEC CHECKSUMS' of undefined
at getDependenciesFromPodfileLock (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli-platform-ios/build/link-pods/getDependenciesFromPodfileLock.js:63:58)
at warnAboutPodInstall (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli-platform-ios/build/link/warnAboutPodInstall.js:43:67)
at Object.runIOS [as func] (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli-platform-ios/build/commands/runIOS/index.js:80:36)
at Command.handleAction (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli/build/index.js:164:23)
at Command.listener (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:315:8)
at Command.emit (events.js:198:13)
at Command.parseArgs (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:651:12)
at Command.parse (/Users/mine/Documents/code/js/emps_fe6/node_modules/commander/index.js:474:21)
at setupAndRun (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli/build/index.js:237:24)
at Object.run (/Users/mine/Documents/code/js/emps_fe6/node_modules/#react-native-community/cli/build/index.js:184:11)
First install the cocoapods
sudo gem install cocoapods
Then run the below command on root folder
cd ios && pod install && cd ../ && react-native run-ios
Step 1:
sudo gem install cocoapods
Step 2:
cd ios && pod install && cd ../ && react-native run-ios
If you still get error while installing pods continue the below steps.
Step 3: Put this in console ->
xcrun -k --sdk iphoneos --show-sdk-path
if the answer is
xcrun:_ error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
then put this:
sudo xcode-select --switch /Applications/Xcode.app
Then install pod again
I had the same issue and I solve the problem using bellow approach.
Navigate to iOS folder and then run bellow command:
pod update
pod update command will update all dependency and generate a "Podfile.lock" file.
I had a similar issue and resolved it by jumping into the ios folder and running:
pod update
Doing this directly in the ios folder resulted in the generation of Podsfile.lock
Changing out of ios into the main directory I was able to then launch the app on an IOS simulator using:
npx react-native run-ios
I have tried many solutions. But finally tried something logical. I don't know why i didn't tried first :)
pod install doesn't work.It changes nothing. The problem is "Podfile" is there but not "Podfile.lock". Thats the problem. When we try install again, it is doing nothing because Podfile is there.
Solution is removing "Podfile" then pod install again. Then you will see both files "Podfile" and "Podfile.lock". After many hours of struggling, this was the solution for me and i have tried many thing :) Good luck to you all.
For anybody with Mac M1 that nothing worked and still having the problem.
They actually say at the docs you need to run those commands
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
when it ends will tell
[!] Please close any current Xcode sessions and use `MyApp.xcworkspace` for this project from now on.
Pod installation complete! There are 55 dependencies from the Podfile and 46 total pods installed.
if you go and now run pod install you will notice the deference
This solution would work when you are trying to START a project, I don't know if it would help while you are in one and come across this issue.
Here is what I did:
install node.js (unless you already have it downloaded)
TO CHECK: go into terminal and type: node -v
install homeBrew (unless you already have it downloaded)
To download: go into terminal and type: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
remember to read what it says on the terminal to fully download it (there should be like two other commands you put in)
install watchman, on terminal type: brew install watchman
on terminal uninstall all your cocoapod stuff. Check how to with this link: https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
open up VScode
type npx react-native init TestProject
choose the method to install Cocoapods through Homebrew
This worked for me.
I have two almost identical lines in the script section of my package.json:
"build-i18n:de": "ng build --output-path=../m_access/dist/de --aot --prod --base-href /de/ --i18n-file=src/locale/messages.de.xlf --i18n-format=xlf --i18n-locale=de",
"build-i18n:en": "ng build --output-path=../m_access/dist/en --aot --prod --base-href /en/ --i18n-file=src/locale/messages.en.xlf --i18n-format=xlf --i18n-locale=en",
The npm run build-i18n succeeds, the german one npm run build-i18n:de fails with an error message ERROR in Cannot read property 'start' of null.
How to find such an error, which is ok in one language, but not in another?
EDIT-1
angular-version:
Angular CLI: 7.1.3
Node: 8.11.3
OS: win32 x64
Angular: 7.1.3
... cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
#angular-devkit/architect 0.11.3
#angular-devkit/build-angular 0.11.3
#angular-devkit/build-optimizer 0.11.3
#angular-devkit/build-webpack 0.11.3
#angular-devkit/core 7.1.3
#angular-devkit/schematics 7.1.3
#angular/animations 7.1.4
#angular/cdk 7.2.0
#angular/material 7.2.0
#ngtools/webpack 7.1.3
#schematics/angular 7.1.3
#schematics/update 0.11.3
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1
$ npm --version
6.5.0
$ node --version
v8.11.3
I found the root cause of this issue, it was a missing / in the closing part of target:
<target>Password<target>
has to be
<target>Password</target>
Hopefully this can help others with similar issue.
After I added shared_preferences to pubspec.yaml, iOS sumulator never success to build.
I tried
flutter clean
upgrade cocoapods
pod install
pod uninstall
pod deintegrate
But none of them resolved this problem.
versions
~/i/fissus ❯❯❯ flutter --version master ✱
Flutter 0.10.1-pre.45 • channel master • https://github.com/flutter/flutter.git
Framework • revision bdc3dda5f2 (2 days ago) • 2018-10-15 15:03:02 -0700
Engine • revision 32f417db0d
Tools • Dart 2.1.0-dev.7.1.flutter-b99bcfd309
~/i/fissus ❯❯❯ dart --version master ✱
Dart VM version: 2.0.0 (Fri Aug 3 10:53:23 2018 +0200) on "macos_x64"
~/i/fissus ❯❯❯ pod --version master ✱
1.5.3
pubspec.yaml
name: fproject
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
rxdart: ^0.19.0
cupertino_icons: ^0.1.2
font_awesome_flutter: ^8.1.0
http: ^0.12.0
shared_preferences: ^0.4.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
fonts:
- family: Noto
fonts:
- asset: fonts/NotoSansCJKjp-Regular.otf
- asset: fonts/NotoSansCJKjp-Bold.otf
error message
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ERROR: Invalid version /Users/ryu.ishikawa/issus/fissus/ios/./Podfile.lock
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Could not build the application for the simulator.
Error launching application on iPhone XS Max.
Exited (sigterm)
memo
I've read this issue, but I cannot resolve this.
https://github.com/flutter/flutter/issues/10089
Sorry, this problem is not caused by Flutter.
GVM(a version management tool of go) overrides diff command.
So, diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null always failed.
$ cd /Users/#{your_user_name}/Library/Developer/Xcode/DerivedData/Runner-{some_hash}/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build
# there are some .sh file. one of them.
$ cat Script-527F3B8B313E5250A155F99B.sh
#!/bin/sh
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"
to fix
configure .zshrc or so on to use default diff command.