I have a React-Native app, using AWS Amplify that works with Expo when testing using expo start --web, but I am trying to test on my iOS device and get a Could not connect to development server. Error. URL: http://192.168.1.6:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=ios&dev=true&hot=false&minify=false
EDIT: I have tried starting a blank project, using amplify pull, and then this error occurs:
jest-haste-map: Haste module naming collision: projectamplifyjsc7fc9745PostConfirmation
The following files share their name; please adjust your hasteImpl:
* <rootDir>\amplify\#current-cloud-backend\function\projectamplifyjsc7fc9745PostConfirmation\src\package.json
* <rootDir>\amplify\backend\function\projectamplifyjsc7fc9745PostConfirmation\src\package.json
Failed to construct transformer: DuplicateError: Duplicated files or mocks. Please check the console for more info
at setModule (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:620:17)
at workerReply (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:691:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 50) {
mockPath1: 'amplify\\#current-cloud-backend\\function\\projectamplifyjsc7fc9745PostConfirmation\\src\\package.json',
mockPath2: 'amplify\\backend\\function\\projectamplifyjsc7fc9745PostConfirmation\\src\\package.json'}
Error: Duplicated files or mocks. Please check the console for more info
at setModule (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:620:17)
at workerReply (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:691:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 50)
Error: Duplicated files or mocks. Please check the console for more info
at setModule (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:620:17)
at workerReply (C:\Users\me\Desktop\project\node_modules\jest-haste-map\build\index.js:691:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 50)
What is this and how to fix?
This answer comes from someone who had a similar issue with the Amplify API, find it here: Amplify React Native - Duplicate Error using amplify add api
Solution is simple (at least for me, guess it could depend on what amplify services you use).
Amplify creates a copy of your current cloud backend configuration in
amplify/#current-cloud-backend/.
You don't need those files to build your app, so you can ignore them
in order to get rid of the error.
To do so, you can create a blacklist and add the folder to it. Create
a rn-cli.config.js file in the root of your project.
./rn-cli.config.js:
require('metro').createBlacklist;
const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = { resolver: {
blacklistRE: blacklist([/#current-cloud-backend\/.*/]), }, }; ```
See answer given here: https://stackoverflow.com/a/60899723/11255886
Related
A expo build is failing on my computer though it is working on the other developers' laptop. The discrepancies are that he is running another version of IOS on his simulator, we don't see this being the issue though.
Problem:
After an expo start -c & running on IOS the build fails with the following errors:
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules/metro-runtime/src/polyfills/require.js:237:40 in guardedLoadModule
at http://192.168.0.62:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:null in global code
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:95:17 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:141:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:39 in handleError
at node_modules/#react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError```
Has anyone seen this or does anyone have ideas on how to get around this issue?
I have tried npm install, clearing caches, resetting file paths, and rebuilding expo builds.
I am trying to boot up a React Native 0.53.3 app with React 16.2.0 using simulator from Xcode 10.1 on High Sierra.
I previously had some issues that I have since resolved just to get the build to succeed:
npm-shrinkwrap.json: Could not install from "node_modules/react-navigation/react-native-tab-view#github:react-navigation/react-native-tab-view
React Native: ":CFBundleIdentifier", Does Not Exist
Now all build succeed even though I continue to get the cfbundleridentifier error:
Check dependencies
** BUILD SUCCEEDED **
Installing build/Build/Products/Debug-iphonesimulator/NFIBEngage.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NFIBEngage.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Even in Metro Bundler it succeeds:
Metro Bundler ready.
Loading dependency graph, done.
BUNDLE [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
BUNDLE [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.
DELTA [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
MAP [ios, dev] ./index.ios.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1667/1667), done.
So I was wondering why my app when launched in simulator would stay stuck in the splashscreen, that usually only happens when an index.ios.js has failed. So I looked at http://localhost:8081/debugger-ui/ and sure enough I saw the following errors:
Module AppRegistry is not a registered callable module (calling runApplication)
Unhandled JS Exception: Cannot read property 'invocationEventNone' of undefined
Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)
I don't know where its getting invocationEventNone from, its not anything written in the codebase, I checked.
As far as the `AppRegistry` module, it appears to look fine:
import {AppRegistry} from 'react-native';
import KeyboardManager from 'react-native-keyboard-manager';
import NFIBEngage from './App';
KeyboardManager.setToolbarPreviousNextButtonEnable(true);
AppRegistry.registerComponent('NFIBEngage', () => NFIBEngage);
Has anyone experienced something like this running versions similar to what I am running? What should I be investigating? How to resolve this?
I followed every solution in here:
Module AppRegistry is not registered callable module (calling runApplication)
There was nothing in here that could help:
React Native Module AppRegistry is not a registered callable module
This was not relevant:
React Native(iOS) Module AppRegistry is not a registered callable module (calling runApplication)
Not relevant:
React native AppRegistry is not a callable module
I then tried following the solution offered by iDevAmit here:
React-Native: Module AppRegistry is not a registered callable module
but it appears my iOS which is what I am interested in running right now, is already linked according to this output:
rnpm-install info Platform 'ios' module appcenter is already linked
rnpm-install info Linking appcenter android dependency
rnpm-install info Platform 'android' module appcenter has been successfully linked
iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
Added code to initialize iOS AppCenter SDK in ios/NFIBEngage/AppDelegate.m
Could not install dependencies using CocoaPods.
Please refer to the documentation to install dependencies manually.
Error Reason - Could not find "pod" command. Is CocoaPods installed?
Configuring AppCenter Analytics
rnpm-install info Platform 'ios' module appcenter-analytics is already linked
? For the Android app, should user tracking be enabled automatical
ly? (Use arrow keys)
❯ Enable Automatically
Enable in JavaScript iOS App Secret is '00000000-0000-0000-0000-000000000000' set in ios/NFIBEngage/AppCenter-Config.plist
? For the iOS app, should user tracking be enabled automatically?
(Use arrow keys)
❯ Enable Automatically
Enable in JavaScript
I did a Ctrl + C to get out and I do not know if the CocoaPods message is related as I have never used it. One time I tried a pod install and zsh could not find pod as a command.
Omar's solution does not work as it gave me Duplicate declaration "appName"
None of the other recommendations were applicable and upgrading React Native is not an option for this project.
In my Xcode 10.1 I have the current configuration inside of Project Settings -> Advanced button:
In this post:
React Native IOS Build CFBundleIdentifier Does not Exist
I already have what SUMIT and priyanga recommended.
What resolved this error was by removing the Instabug library and code from App.js file:
export default class appName extends PureComponent {
constructor() {
super();
this._startSentry();
// if (Platform.OS === "ios") {
// const key = base === "prod" ? env.instabug.prod : env.instabug.beta;
// Instabug.startWithToken(key, Instabug.invocationEvent.twoFingersSwipe);
// }
// Instabug.setIntroMessageEnabled(false);
// appcenter.trackAppOpened();
}
as I was also getting invocationEvent undefined along with that AppRegistry error.
I've got an error on react-native :
console.error: "[DB] Uh-oh. Database failed to load, we're in big trouble",
{"line":154357,"column":32,"sourceURL":"http://localhost:8081/index.bundle?platform=
ios&dev=true&minify=false"}.
Complete stack trace
I don't use expo, I do the react-native link (+ test to link manually) but nothing works 😢
Plateform : iOS 12.1, Iphone X on simulator,
Node : 11.4.0
NPM: 6.5.0
react-native-cli: 2.0.1
react-native: 0.57.7
WatermelonDB : 0.9.0
Do you have any idea of how can I debug that ?
Thanks
I faced same issue with WatermelonDB one time. It was caused by passing wrong configuration to the dataStore adapter. You may want to check your configuration incase you have same error sometime.
See my case below...
import { Database } from '#nozbe/watermelondb';
import SQLiteAdapter from '#nozbe/watermelondb/adapters/sqlite';
import { PostModel } from './Models/PostModel';
import { rootSchema } from './rootSchema';
const adapter = new SQLiteAdapter({
--- rootSchema, // invalid, what caused error
+++ schema: rootSchema, // valid configuration
});
const database = new Database({
adapter,
modelClasses: [
PostModel,
...
we are trying to create a Scala project which uses Spark also but we are facing issue Encountered error while reading extension file 'intellij_info_bundled.bzl': no such package '#intellij_aspect//': No WORKSPACE file found in C:/users//_bazel_user/i45wuf6d/external/intellij_aspect. Is it has something missing in Intellij?
Scala file
package src.main.scala
object HelloWorld extends App {
def main(args: Array[String]) {
println("Hello, world!")
}
}
Build file
package(default_visibility = ["//visibility:public"])
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_test")
scala_library(
name = "hello-world",
srcs = glob(["src/main/scala/*.scala"]),
)
scala_test(
name = "Hello_test",
srcs = glob(["src/main/scala/*.scala"]),
size = "small", # Expect this test to run quickly
)
Work Space
workspace(name = "scala_example")
rules_scala_version="7522c866450cf7810eda443e91ff44d2a2286ba1" # update this as needed
http_archive(
name = "io_bazel_rules_scala",
url = "https://github.com/bazelbuild/rules_scala/archive/%s.zip"%rules_scala_version,
type = "zip",
strip_prefix= "rules_scala-%s" % rules_scala_version
)
load("#io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()`enter code here`
# register default scala toolchain
load("#io_bazel_rules_scala//scala:toolchains.bzl", "scala_register_toolchains")
scala_register_toolchains()
Command and Error from console
Command: C:\ProgramData\chocolatey\bin\bazel.exe build --tool_tag=ijwb:IDEA:community --keep_going --curses=no --color=yes --experimental_ui=no --progress_in_terminal_title=no --aspects=#intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect --override_repository=intellij_aspect=C:\Users\ADMIN.IdeaIC2017.3\config\plugins\ijwb\aspect --output_groups=intellij-compile-java,intellij-compile-py -- //...:all
INFO: Loading complete. Analyzing...
ERROR: Encountered error while reading extension file 'intellij_info_bundled.bzl': no such package '#intellij_aspect//': No WORKSPACE file found in C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/external/intellij_aspect.
INFO: Found 3 targets...
WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-out -> C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out: Cannot create junction (name=C:\users\admin\scalaprojects\example1\bazel-out, target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file-jni.cc(86): nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out, C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file.cc(128): CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out): Cannot create a file when that file already exists.
cannot create symbolic link bazel-out -> C:/users/admin/appdata/local/temp/_bazel_sandhya/criyrv6d/execroot/scala_example/bazel-out: Cannot create junction (name=C:\users\admin\scalaprojects\example1\bazel-out, target=C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file-jni.cc(86): nativeCreateJunction(C:\users\admin\scalaprojects\example1\bazel-out, C:\users\admin\appdata\local\temp_bazel_sandhya\criyrv6d\execroot\scala_example\bazel-out): ERROR: src/main/native/windows/file.cc(128): CreateJunction(\?\C:\users\admin\scalaprojects\example1\bazel-out): Cannot create a file when that file already exists.
.
INFO: Building...
ERROR: command succeeded, but not all targets were analyzed.
INFO: Elapsed time: 18.108s, Critical Path: 0.05s
Make failed
This is a sample Helloworld program only
In general, like #Ittai, I would suggest you open an issue in the intellij plugin github repo.
Unfortunately, your version of the plugin is no longer supported. I, too, previously ran into an issue with an older version of the plugin and was recommended to upgrade to the latest version. Which resolved the specific issue I was facing.
When reporting the issue make sure to include the following bits of information:
intellij build number
plugin version number
rules_scala version
operating system (it seems your using Windows, while most users use unix based systems)
bazel release number
how you have opened the intellij project (BUILD file, WORKSPACE, .blazeproject)
Additionally, to verify this is in fact an issue with the plugin, I would also suggest you try to reproduce this issue on a Unix based system. It seems you are using Intellij
compile on Windows. This may be Windows specific issue with aspects not being recognized.
When attempting to reproduce, make sure to clone your repository in a separate directory, close the intellij project, and reopen the project
i am trying to integrate the Scandit Barcode scannner plugin to my cordova based application for iOS platform, but am unable to accomplish that. i have tried the following steps:
1) downloaded the SDK for Phonegap/Cordova and extracted it to a folder.
2) using the Cordova CLI, i executed the following command:
cordova plugin add <path to the folder>
i get the following error when i run that:
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: Parsing /Users/macuser/Desktop/AppBackup/miniOrangeAuthenticator/platforms/ios/miniOrange Authenticator/config.xml failed:
ENOENT, no such file or directory '/Users/macuser/Desktop/AppBackup/ProjectName/platforms/ios/miniOrange Authenticator/config.xml'
at Object.config_parser (/usr/local/lib/node_modules/cordova/src/config_parser.js:28:15)
at Object.ios_parser (/usr/local/lib/node_modules/cordova/src/metadata/ios_parser.js:62:19)
at /usr/local/lib/node_modules/cordova/src/plugin.js:98:46
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:821:14
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
macmans-MacBook-Air:ProjectName macuser$
what may be the reason? is there any other way i canaccomplish it (without CLI) ?
Change miniOrange Authenticator to miniOrangeAuthenticator. I don't think the CLI is a big fan of spaces (I have had problems in the past with them).