Skip to Content
Menu
This question has been flagged
2 Replies
2928 Views


I just simply want to open contacts and it gives me this error

Cannot read properties of undefined (reading 'string')

I have no idea how to fix it

TypeError: Cannot read properties of undefined (reading 'string')
at http://localhost:8069/web/assets/59556249fb3/web.assets_backend.min.js:6575:211
at traverse (http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:200)
at http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:242
at Function.each (http://localhost:8069/web/assets/4367-3b809bf/web.assets_common.min.js:171:149)
at traverse (http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:211)
at http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:242
at Function.each (http://localhost:8069/web/assets/4367-3b809bf/web.assets_common.min.js:171:149)
at traverse (http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:211)
at http://localhost:8069/web/assets/5955-6249fb3/web.assets_backend.min.js:6570:242
at Function.each (http://localhost:8069/web/assets/4367-3b809bf/web.assets_common.min.js:171:149)

This happened after installing the following module: Vendor Purchase Discount
by Cybrosys Techno Solutions

I've tried to upgrade the module but to no avail. My installation is on windows.

Avatar
Discard
Author Best Answer

Hello TTN Solution, I did what you told you and gave the following:


The error you gave me was in the following file error_service.js 

export const errorService = {
start(env) {
function handleError(uncaughtError, retry = true) {
let originalError = uncaughtError;
while (originalError && "cause" in originalError) {
originalError = originalError.cause;
}
const services = env.services;
if (!services.dialog || !services.notification || !services.rpc) {
// here, the environment is not ready to provide feedback to the user.
// We simply wait 1 sec and try again, just in case the application can
// recover.
if (retry) {
browser.setTimeout(() => {
handleError(uncaughtError, false);
}, 1000);
}
return;
}
for (const handler of registry.category("error_handlers").getAll()) {
if (handler(env, uncaughtError, originalError)) {
break;
}
}
if (uncaughtError.event && !uncaughtError.event.defaultPrevented) {
// Log the full traceback instead of letting the browser log the incomplete one
uncaughtError.event.preventDefault();
console.error(uncaughtError.traceback); //-> Error in this line
}
}


And here:


browser.addEventListener("unhandledrejection", async (ev) => {
const error = ev.reason;
const uncaughtError = new UncaughtPromiseError();
uncaughtError.unhandledRejectionEvent = ev;
uncaughtError.event = ev;
if (error instanceof Error) {
error.errorEvent = ev;
const annotated = env.debug && env.debug.includes("assets");
await completeUncaughtError(uncaughtError, error, annotated);
}
uncaughtError.cause = error;
handleError(uncaughtError); // -> Error
});


I've tried everything but I don't know what else to do.

Avatar
Discard
Best Answer

An error message like this can be difficult to pinpoint the exact cause if you don't provide the code. It often indicates an issue with the website's JavaScript files stored in the static directory. You can locate the error position by following these steps:

  1. Open the browser's developer tools: Right-click on the webpage, select "Inspect" or "Inspect Element" from the context menu, or press Ctrl+Shift+I (or Command+Option+I on macOS) to open the developer tools.
  2. Navigate to the "Console" tab: In the developer tools panel, locate and click on the "Console" tab. This is where you will see error messages and warnings.
  3. Look for the error message: Scan the console for any error messages related to JavaScript. They are typically marked with a red icon or highlighted in red text.
  4. Click on the error message: Click on the specific error message in the console. This action will typically take you to the location of the error within the JavaScript file.

By following these steps, you can identify the line or file that is causing the error and investigate further to resolve the issue. It's essential to review the code and understand the context in which the error occurs to debug and fix the problem effectively.


Avatar
Discard
Related Posts Replies Views Activity
1
May 25
316
1
Mar 25
603
1
Feb 25
832
2
Feb 25
915
2
Feb 25
1132