TypeError: Cannot read properties of undefined (reading 'navigationStart') - lit-element

This error appears when multiple pages are tested by test run (vitest). Pages are built with lit.dev (web component)

Related

Website on nodejs and mongodb typeerror cannot read properties of undefined (reading 'date') after moving to new server

I hope I'm in the right place.
We have a problem with our website. We only got files and a database from the previous admin. I uploaded them to the server and the site is partially working.The problem arises when we click one of the links to articles on the site. The place where the article should be placed is empty. The console in chrome says:
TypeError: Cannot read properties of undefined (reading 'date')
at Cn.eval (eval at Qa (vue.js:6:92206), <anonymous>:3:386)
at e._render (vue.js:6:35554)
at Cn.r (vue.js:6:68565)
at pn.get (vue.js:6:26867)
at pn.run (vue.js:6:27751)
at ln (vue.js:6:25859)
at Array.<anonymous> (vue.js:6:12476)
at We (vue.js:6:11877)
and a warning:
"DevTools failed to load source map: Could not load content for https://example.com/js/axios.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE"
I read about it on stack and other pages and it seams that the variables aren't defined.
It was working on the previous server. :(
As I understand it, when I copied the files and the database and installed all the dependencies it should work? Or is there anything that I'm missing?
I think that connection with database works, other parts of the website are working and some of the data for the website is working fine.
It seams like there is something missing, but I have no idea what.
Can it be that because of the missing axios.map file the js can't define some of the variables on the website?
What could have caused it during the transfer? Some files missing? collection error in mongodb?
I'm struggling for over a week now, and I ran out of ideas for the moment...
Is there any way I can debug it?
I'm not a js programmer but a simple admin and I'm getting kind of confused. Has anyone had such a problem?
If anyone needs any more info please let me know.
What I did:
installed nodejs via nvm install 12.18.4 //it's the version on which it was working earlier, on previous server
installed mongo and imported collections to the database in json format
installed and configured nginx to handle the request foe the website
deleted the modules folder and npm install'ed them again

ffmpeg inside chrome extansion

hello I am trying to use the ffmpegwasm/ffmpeg.wasm library inside chrome extension
the library is loaded inside react component that is located inside an iframe
the problem is when I try to load I got an error that I cannot download the core files
I tried to use the example library for chrome extension but also got an error "Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined error. "
the files are web_accessible_resources inside the manifest
I am using manifest version 3

node-soap working differently with different wsdl files. I am getting this error "TypeError: Cannot read property 'postProcess' of undefined"

I am using node-soap to create a soap client. I have tried with different WSDL files and worked fine but one WSDL file seems complex. I tested this WSDL with SOAPUI and worked fine. But if I try to create a soap client, it is throwing the following error. Any help really appreciated!!!
TypeError: Cannot read property 'postProcess' of undefined
I am sharing the link to the WSDL file.
WSDL link
Full-stack trace of error
*TypeError: Cannot read property 'postProcess' of undefined
at OperationElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:874:15)
at PortTypeElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:914:13)
at BindingElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:968:16)
at ServiceElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:1042:19)
at D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:112:30
at WSDL._processNextInclude (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:1186:14)
at WSDL.processIncludes (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:173:10)
at D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:101:12
at processTicksAndRejections (internal/process/task_queues.js:75:11)*
I had the same issue with one of the WSDL files. I would like to add something here. Try to add the extension Wizdler which is available in chrome. Once you try to open the code in chrome and run the extension, you can easily find out the data model and the methods used in the WSDL file. So, with your WSDL file, this is what I got as the result in Wizdler.
This might be helpful to resolve your issue.

How to avoid multiple copies of react when both module and project are bundled with webpack 2

I have made a module named as services which serves the loading bar, notifications and flash banner etc to other projects. I bundled this module by babel and it was running perfect but as the requirements kept growing for services so i have to bundled this from webpack-2 because of css type issues. I bundled it as a library. But when i uses notifications which are imported from services, it gives such warnings
Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded
and
index.js:25 Uncaught TypeError: Cannot read property 'componentWillEnter' of undefined
PS: I have already tried resolve.alias and externals properties of webpack but no use :( Any suggestions Please?

Chrome extension: "Uncaught Error: "getBackgroundPage" can only be used in extension processes...."

I published a chrome extension to testers only. The app seems to work very well. I don't see any errors when inspecting the console for the popup or the background page. However, I get the following error when inspecting the console for any web page: "Uncaught Error: "getBackgroundPage" can only be used in extension processes. See the content scripts documentation for more extensions/schema_generated_bindings.js:418"
This app contains several JavaScript files, but each one includes the code within a self executing function. The "getBackgroundPage" calls are in the JavaScript files.
Could you please help? Isn't the app I built an isolated module independent from any web page? How can I prevent this error from happening?
I had the same error when I was trying to communicate with the background page from my content script. The correct way of doing it is via Message Passing. It is very well documented here : https://developer.chrome.com/extensions/messaging.html

Resources