Unable to run Playwright with cucumber due to errors - javascript

Apologies if the errors are pretty simple. I'm trying my hand at a Playwright TS repo with cucumber js. I've worked with Playwright and Cucumber before, with JS, but not TS. So, it's my first foray with TS.
I'm trying to implement the POM that I've worked in the past with my other Playwright/Cucumber projects. However I've been hit with multiple errors - have tried a lot of hit and trial methods but each one turning into a dead end.
Error -
#Smoke
Scenario: User is able to login with valid credentials # features/login.feature:3
Given User is on the "Login" Page
User is on the Login Page
✖ failed
TypeError: Cannot read property 'visit_base_url' of undefined
at /Users/Rahul_Yadav/Documents/FE-Projects/play-cuke-ts/src/step-definitions/login.step.ts:16:24
at Generator.next (<anonymous>)
at fulfilled (/Users/Rahul_Yadav/Documents/FE-Projects/play-cuke-ts/src/step-definitions/login.step.ts:5:58)
at runNextTicks (node:internal/process/task_queues:61:5)
at processImmediate (node:internal/timers:437:9)
Here is the repo for issue reproduction purposes - https://github.com/zac11/play-cuke-ts
Can someone please help me in this issue? If there are issues with configuration, the please also mention what updates I should do.

Related

Heroku Blank Screen on Deploy: React, and Ruby on Rails

I have a Heroku test environment with a Ruby on Rails backend and React front-end. Recently, I pushed out some changes to the test environment and am now getting a blank screen with one of two errors. Either:
<body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.d825ec61.js"></script></body>
or:
Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
at redux.js:523:1
at o (redux.js:87:1)
at Object.<anonymous> (store.js:14:15)
at t (bootstrap 145a692a3e0162c12867:19:1)
at Object.<anonymous> (main.d825ec61.js:30447:65)
at t (bootstrap 145a692a3e0162c12867:19:1)
at Object.<anonymous> (main.d825ec61.js:29463:18)
at t (bootstrap 145a692a3e0162c12867:19:1)
at bootstrap 145a692a3e0162c12867:62:1
at bootstrap 145a692a3e0162c12867:62:1
depending upon who is trying to open the app.
Here is a link to the test site on Heroku: https://alutiiq-lang-test.herokuapp.com/ Please note that it is a free dyno, so takes a minute to load (if it loads for you!), and here is the repo I am working in https://github.com/migobach/alutiiqLang.
When I do roll back to a previous version, it works fine, but I cannot figure out what the difference is aside from on package that I added: "react-contenteditable": "^3.3.5", which I need for admin privileges.
My Heroku logs have no errors that should prevent rendering, and the build is successful, however, nothing renders.
The solution ended up being related to Redux. After purging all caches, and testing locally in an incognito window, I was able to see the error in greater detail which helped me ask better questions and lead me to this solution. After commenting out this line from my code:
window.__REDUX_DEVTOOLS_EXTENSION__&& window.__REDUX_DEVTOOLS_EXTENSION__()
I was able run locally with no issue, and then push to Heroku successfully.

Unable to resolve module react-native-reanimated/src/core/AnimatedEvent

This is my first post so my apologies if I leave out some important details that will make it easier to answer the question.
As I was working on my project for my app development class I stumbled upon an error that I cannot fix/figure out what's causing it. I did not mess with any of the node modules and the app was working perfectly fine before the error message.
Image of error message
I have attempted to clear the cache, re install and update some of the packages that I needed for this project, and looked for any errors within the code of my project. No luck after 2 hours of attempts.
Are there any recommendations of that I need to do to fix this? Should I start the project from scratch again?
Thank you all!
Have you tried cd ios && pod install? Also, upload your package.json file
As the error suggests react-navigation-drawer is trying to find a component which doesn't exist. Implying your versions are out of sync.
I was able resolve this issue by upgrading react-navigation#4.0.0.

React Build Failing - how to troubleshoot

I have a React Frontend Project that works correctly with npm start - the frontend works as expected when I run it this way.
However, when I npm run build and then serve the file with express, the frontend fails. The frontend doesn't load in my browser and I see the error: Uncaught TypeError: l[e] is undefined on Firefox and Uncaught TypeError: Cannot read property 'call' of undefined on Chrome.
The stack trace associated with those errors isn't very helpful as it just directs to chunk.js. I need to somehow figure out what's causing this issue. My boss suggested someone else working on the project likely made a coding error and we'll have to clean up everything to debug (this setup was working a week ago). Is there anything I can do to debug this short of going through every line of code?
Thank you!

Does someone encounter such an error: "Uncaught TypeError: t.mount is not a function"

If open this error in the browser there is the next piece of code:
return this.isMounted&&n&&(t.mount(this.node),this._emitter.emit(A,t.node))
so the error on the t.mount(this.node)
It is minified React code. It's obvious that it does not tell nothing, so I went to build folder and searched for ".mount(" and it found the next piece of code in .app.js file:
symbol.mount(sprite.node)
which looks like the pice of code with the error.
I google for symbol.mount typeerror, but could extract any useful suggestion.
Maybe someone encounter something similar or have and idea what could it be?
Additional info: there is no error when project is run locally (even when built locally), only when deployed on the remote server..

DOMException error creating AudioWorlet with Webpack

I got an error when trying to create an AudioWorklet, but only when the project is served through webpack-dev-serve. If I serve the files directly with an http server, everything works fine. So I think it must be something related with Webpack configuration.
This is the error I get:
audio-meter.js:19 Uncaught (in promise) DOMException: Failed to construct 'AudioWorkletNode': AudioWorkletNode cannot be created: The node name 'audio-meter' is not defined in AudioWorkletGlobalScope.
at new AudioMeterNode (http://localhost:9999/bundle.js:9421:17)
at Function.create (http://localhost:9999/bundle.js:9430:16)
I've been searching and there are some related questions, but none of them helped me to solve the problem. One of them points to a Chromium bug, but in this case the error only happens when the project is served through Webpack (I'm using worker-loader plugin):
AudioWorklet DOMException error when loading modules
AudioWorklet error: DOMException: The user aborted a request
Use AudioWorklet within electron (DOMException: The user aborted a request)
I've set up here a branch with the most simplified version of the project I've could, there are some files involved so I think you could see it better this way. To get it, please: git clone git#bitbucket.org:alvaro_maceda/notoono.git and git checkout stackoverflow.
If you run it with npm start it will use Webpack and, when you press the "start" button, you will see the error on the console. If you comment audio-meter.js:11 and uncomment audio-meter.js:11 and index.html:14 you can run it with npm start http and everything will go fine.
Could anybody give an idea about what to search or where the error could be?

Categories

Resources