Why has my code stopped working?

Hi,

I have been building a some code to do some custom operations on the page. Everything was working fine. However, for the last few refreshes the UI has stopped responding to the code. I reverted back to the last version of the code that was working. However the issues remain.

I see a few more errors than before when the page loads.
“Uncaught (in promise) TypeError: Cannot read property ‘call’ of undefined”

These seem to be in wix internal code. A snapshot for such an error is attached. Can someone please help with this problem?


All the errors are linked to one line of code at comlink.ts
new Error(serialized.value.message)

There is another error that I see


This is linked to a line of code using originalFetch.apply(global, args)

3 Likes

Hi, I’ve been having the same problem lately. Errors and warnings appearing without making any changes.

In my case the error is:
Uncaught (in promise) TypeError: can’t access property “PageWillUnmountHandler”, s.a is undefined

The curious thing is that all pages continues to run normally in the Editor’s preview mode.

Whatever you developers are doing, please don’t keep doing it this way.

I get the same errors too! same code that worked fine yesterday!!!
Wix probably made an update that crashed everything.

Here’s my post on a similar bug, please follow & upvote it too so they’ll notice/fix it ASAP!

Hi,
the same problem, user javascript execution completely broken. It steel works on some old pages, and not working for any new page and most old pages.

Corvid team: any plan to fix it? any timeframe?

The best way to solve this problem is that

CLEAR SITE DATA FROM SITE SETTINGS

Could you be more specific? What data exactly and what settings?

I believe that the best way to resolve it would simply be to keep what was working until yesterday, by the way.

What does this mean? Can you elaborate? Really need urgent help on this issue

Unfortunettly, we had some kind of problem that we think we fixed, can you please check if the site is working again?

Yes, it seems to be working fine now. Thanks!

The same issue seems to have started again

can you send me the details? what is not working? and where?

@avigu
The problem seems to come and go intermittently

I have build some event listeners to show and collapse inputs and texts on the page. When I publish the page - on some occasions the code runs fine. While on others, the text and buttons I have set up the listeners on, do not respond. In the console I can see the errors that I have mentioned above. For your reference, I have putting down the code of one of the listener.

export function text6_click(event) {
    Promise.all([$w("#button1").expand(),
    $w("#text3").expand(),
    $w("#text1").expand(),
    $w("#text8").expand(),
    $w("#text4").expand(),

    $w("#button2").collapse(),
    $w("#text5").collapse(),
    $w("#text6").collapse(),
    $w("#text9").collapse(),
    $w("#input3").collapse(),
    $w("#input4").collapse(),
    $w("#input5").collapse(),
    $w("#dropdown1").collapse(),
    $w("#dropdown2").collapse()])
    $w("#input2").inputType = "password";
    $w("#text10").hide(),
    mode="login";
   
    }

There is other part to the code as well where I am calling a backend function. Most of the changes I am making in that part of the code.

I just re-published the site with no changes to code at all. And now it works. It was not working earlier in the day. I am sorry to keep pinging about this, but we are trying to launch the site soon, so need to understand if we are doing something wrong.

Hello Avi! I’m so sorry to contact you over here, but I really don’t know where to find help elsewhere: All of the sudden many Corvid-based functions of my HOME site www.nicolaipfeffer.com stopped working. Strangely enough, they partially work in the preview mode and also in the preview of the site history. Any help would be so endlessly appreciated!!!

@nicolai-pfeffer I’m sending this on to QA for evaluation.

I have the same error in 2 different site


and the second:

and I discovered that the error is due to wixData, because in the pages where I have not imported this library they work

@bdevelopment2019 What is the issue that you are having? What doesn’t work?

@yisrael-wix https://bdevelopment2019.wixsite.com/social-media
Look at this site, until yesterday 5 test posts appeared, now not and if you look at the console you see the error.

https://bdevelopment2019.wixsite.com/video-corses
And even this other one, until yesterday you could sign up without requiring you to verify the email, but today he decided to request it, the sign up code is the same between the 2 sites but in the latter it requires verification and does not save the data in the database instead in the other yes …

@yisrael-wix This is the sign up code of the first website :

export function btnSignUp_click(event) {
    $w('#txtMessage').text = 'Please wait...';
    $w('#txtMessage').show();
    $w('#btnSignUp').disable();
 //--------------------------------------------------Registra l'utente in wix e nel database---------------------------------------------------//
 let email = $w('#iptEmailAddress').value;
 let emails = [];
    emails.push(email);
 let password = $w('#iptPassword').value;
 let name = $w('#iptFirstName').value;
 let surname = $w('#iptLastName').value;
 let username = $w('#iptUserName').value;
 let isOrganisation = $w('#iptOrganisation').checked;

    wixUsers.register(email, password, {
 'contactInfo': {
 'firstName': name,
 'lastName': surname,
 'emails': emails //questo è un'object
        }
    }).then(() => {
 let toInsert = {
 '_id': wixUsers.currentUser.id,
 'emailAddress': email,
 'peopleId': Math.random().toString(36).substr(2, 4) + Math.round(Date.now() / 1000 / 60 / 60).toString(),
 'firstName': name,
 'lastName': surname,
 'userName': username,
 'orgFlag': isOrganisation,
 'emailVerified': 'No',
 'country': ipCountry,
 'ipAddress': ipAddress,
 'profilePicture': 'https://static.wixstatic.com/media/d763a0_435167fd78a140bc9754f8f066629781~mv2.png'
        }
        wixData.insert('People', toInsert)
            .then(() => {
                addPeopleInfo();
            }).catch((err) => {
                $w('#txtMessage').text = 'An error has occurred, try again later';
                $w('#txtMessage').show();
            })
    });
}

and this the second:

export function btnSignUp_click(event) {
    $w('#btnSignUp').disable();

 let email = $w('#iptEmail').value;
 let emails = [];
    emails.push(email);
 let password = $w('#iptPassword').value;
 let name = $w('#iptName').value;
 let surname = $w('#iptLastName').value;

    wixUsers.register(email, password, {
 'contactInfo': {
 'firstName': name,
 'lastName': surname,
 'emails': emails
        }
    }).then((results) => {
        console.log(results.status); 
 let toInsert = {
 '_id': wixUsers.currentUser.id,
 'emailAddress': email,
 'peopleId': Math.random().toString(36).substr(2, 4) + Math.round(Date.now() / 1000 / 60 / 60).toString(),
 'firstName': name,
 'lastName': surname
        }
        wixData.insert('People', toInsert)
            .then(() => {
                $w('#txtMessage').text = 'Sing in completed successfully, you will be now redirected';
                $w('#txtMessage').show();
                setTimeout(wixWindow.lightbox.close('logInSignUp'), 2000);
            }).catch((err) => {
                $w('#txtMessage').text = 'An error has occurred, try again later';
                $w('#txtMessage').show();
                $w('#btnSignUp').enable();
                console.log(err);
            })
    });
}

@bdevelopment2019 And you say that this issue just started recently?