Cypress text execution error after version update - javascript

While I was having cypress 5.0.0 version, all my test used to run fine.
Now that I've updated it to 6.5.0, I am getting following error when I click on the test file.
**Title:** Error launching browser
**Message:** ERR_FAILED (-2) loading 'https://xxx/__/#/tests/integration\demoTest.spec.js'
**Stack trace:**
```
Error: ERR_FAILED (-2) loading 'https://xxx/__/#/tests/integration\demoTest.spec.js'
at rejectAndCleanup (electron/js2c/browser_init.js:205:1493)
at Object.stopLoadingListener (electron/js2c/browser_init.js:205:1868)
at Object.emit (events.js:315:20)
```
I've also tried installing cypress 6.8.0, but was have same issue, hence downgraded it, but still the error remains.

Related

Error with my finished react-native typescript program

I get a strange error when want to test my program in the terminal. First of all i'm using android studio to see how i'm progressing. So when i type 'npm start' in the terminal i get no problems. So then i press 'a' so it will try to open the program in Android. After that i get this message: Android Bundling complete 4133ms. So all fine now. But then 5 seconds later i get this error: ERROR Error: [#RNC/AsyncStorage]: NativeModule: AsyncStorage is null.
Here is the photo of the problem.
My code is pretty simple. I have an app.tsx, homepage and detailpage. I can type the code here but i think i'll get banned.
I tried this:
Run react-native link #react-native-community/async-storage in the project root.
Restarting the app.

TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')

After upgrading to Expo 46, suddenly I started seeing these errors. I have searched on them, but did not find a solution so far. The app doesn't start anymore, it directly shows these errors.
Any ideas?
ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')
Error: Unable to resolve module ./http://192.168.xx.xx:19000/index.ts from C:\xx/.:
None of these files exist:
* http:\192.168.xx.xx:19000\index.ts(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)
* http:\192.168.xx.xx:19000\index.ts\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)
at ModuleResolver.resolveDependency (C:\xx\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:136:15)
at DependencyGraph.resolveDependency (C:\xx\node_modules\metro\src\node-haste\DependencyGraph.js:231:43)
at C:\xx\node_modules\metro\src\lib\transformHelpers.js:129:24
at Server._resolveRelativePath (C:\xx\node_modules\metro\src\Server.js:1137:12)
at async Server.requestProcessor [as _processBundleRequest] (C:\xx\node_modules\metro\src\Server.js:464:37)
at async Server._processRequest (C:\xx\node_modules\metro\src\Server.js:420:9)
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called
I solved the issue by divide and conquer strategy.
Commenting out every component and uncommenting them step by step until I found the issue.
In my case it was one of my plugins react-native-qrcode-svg, which needed to be updated in order to support the Expo 46 upgrade.

Error when trying to run any Cypress test

I've installed Cypress according to the cypress docs. After opening Cypress and selecting a test to run, I instantly get the following error:
**Title:** Error running plugin
Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js)
Stack trace:
Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js`)
at Object.get (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\errors.js:1043:15)
at EventEmitter.handleError (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\index.js:189:20)
at EventEmitter.emit (node:events:394:28)
at ChildProcess.<anonymous> (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
at ChildProcess.emit (node:events:394:28)
at emit (node:internal/child_process:920:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I've been googling for a few hours and I'm looking for help on how to resolve this issue!
Uninstall Nodejs
Download the Nodejs (Recommended For Most Users) version from the link:
https://nodejs.org/en/
Install the downloaded Nodejs
I had the same issues
in my case, this issue was related to my bitbucket.yml.file, I changed: max-time:(set time for running your tests) in my job, and everything works fine
If you're using Cucumber then review your step files in search of misspelling keywords or case sensitive typos like wHEN or thEn

Task :app:transformClassesAndResourcesWithR8ForRelease FAILED React Native

R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
Current version is: 1.4.94 (build 390954928f0db9c3b888a367f7f128ce3bbfb160 from go/r8bot (luci-r8-ci-archive-0-5g74)).
D8: Program type already present: com.oney.WebRTCModule.BuildConfig
What went wrong:
Execution failed for task :app:transformClassesAndResourcesWithR8ForRelease.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete
The android.enableR8=false is as it is but still after running ./gradlew bundleRelease it is showing me this error.

intern 'Runner' reporter causes errors on Saucelabs, but not 'Console'

Using requirejs as the loader, tests run on Browserstack just fine, however when I try on SauceLabs I get the following error:
Fatal error during pre-execution stage
Error: Load timeout for modules: intern/main!object, intern/chai!_unnormalized2, intern/chai!expect_unnormalized3, angularAMD, angularMocks...
requirejs.org/docs/errors.html#timeout
at makeError <.../require.js:184:17>
at checkLoaded <.../require.js:860:23> at <.../require.js:892:25>
It seems switching to the 'Console' reporter instead of 'Runner' fixes the problem - why is this?
I'm using intern-runner to start the tests, so should 'Runner' not be the most appropriate choice?

Categories