DOMException error creating AudioWorlet with Webpack - javascript

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?

Related

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!

Error importing dependency in Cypress Cucumber

I have a problem when importing some dependencies in Cucumber. The error is the following:
Running: features\my_feature.feature... (1 of 1)
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Oops...we found an error preparing this test file:
cypress\integration\features\my_feature.feature
The error was:
Error: Cannot find module 'C:gitdevelopPROJECT
ode_modulescypress-cucumber-preprocessorlib/resolveStepDefinition' from 'C:\git\develop\PROJECT\cypress\integration\features'
This occurred while Cypress was compiling and bundling your test code. This is usually caused by:
- A missing file or dependency
- A syntax error in the file or one of its dependencies
Fix the error in your code and re-run your tests.
I'm not able to run the features I worked on because of this. I suppose the key for the error is in line 3. I'll explain this, the path of the file is the following: C:\git\develop\PROJECT\cypress\node_modules\cypress-cucumber-preprocessor\lib\resolveStepDefinition, but the library is recognizing the \n substring from \node_modules as a break line and is not recognizing the \ in the path. I don't know if that makes any sense.
I don't know what to publish here, because I don't think it's related to a configuration or anything like that. If you have any idea or need anything else, please, tell me. I'll publish all that could be required.
Make sure your file structure is like:
cypress/integration/myfeatures/feature1.feature
cypress/integration/myfeatures/feature1/feature1.js
This structure is required by cypress-cucumber-preprocessor and might be why you get the resolveStepDefinition error message. See the github docs
I believe the error message you get is misleading you in thinking the '\n' is an issue in the code, but in reality, it's the console that can't properly handle the '\n'.

How do I fix the Cordova error: Failed to fetch platform <<<<< HEAD?

When trying to build my meteor app using commands:
meteor build ~/pesCloneBuild --server localhost:3000
I get the below error message:
Can anyone kindly guide me on how to resolve this issue?
Looking forward to your response.
It seems like your .meteor/platforms file contains a merge conflict (as suggested by #Philipp). Open it in an editor and make sure it only contains valid platform names. Here is an example:
> cat .meteor/platforms
browser
server
To learn more about this file, see https://guide.meteor.com/mobile.html#adding-platforms for an example of how it is used.

Bigcommerce Stencil 500 error

I am trying to get stencil set up on a trial store. I have a stencil theme set as default, installed node 4.4.0 as recommended, everything goes fine. Stencil start goes fine. but when I access the site through the browser I get the following error:
Debug: internal, implementation, error
TypeError: Uncaught error: self.assembler.getTranslations is not a function
at Paper.loadTranslations (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:137:20)
at /Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:62:18
at /Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:718:13
at async.forEachOf.async.eachOf (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:233:13)
at _parallel (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:717:9)
at Object.async.parallel (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/async/lib/async.js:731:9)
at Paper.loadTheme (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/node_modules/#bigcommerce/stencil-paper/index.js:60:11)
at respond (/Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/responses/pencil-response.js:29:15)
at /Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:49:18
at /Users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/#bigcommerce/stencil-cli/server/plugins/renderer/renderer.module.js:246:24
All is working well for me in Node 4.4.5, but I have encountered these errors in the past. Deleting the node_modules folder and running npm i to do a fresh reinstall usually fixes the problem for me. If trouble persists, you may want to uninstall the global #bigcommerce/stencil-cli package and reinstall.
If you pull down the latest version of Stencil (just deployed in the last couple hours), you should have a fix for this. It was an issue introduced in a previous (recent) release.

Parse deploy of cloud code failing with message "Update failed with internal error"

I've been running Parse cloud code for a few months using CLI version 1.4.1 with no problems. I just updated using the CLI to the latest version, 1.4.2, but now when I deploy I get this output:
Uploading source files
Finished uploading files
Update failed with internal error
I've checked for the one problem I see documented elsewhere, which is erroneous quotes around some parse classes like Parse.User and Parse.Installation. It doesn't look like these are my problem.
Is there any way to find out more about the error, besides trial and error with my several thousand lines of code? :)
Upon upload attempt, Parse is parsing your code (pun intended :-) checking for errors, and deployment fails if any errors found.
One possibility is to check Logs (in your Dashboard under Core/Logs), also the Error submenu of Logs.
Another is to run the command parse develop your_app and see all the errors in your terminal.
For a large code, you probably want to write some unit tests if you aren't doing this already.

Categories

Resources