Wix changes cause Wix Code to no longer work?!?!

Over the last weeks or so I have been experiencing a lot of unexpected issues with my wix site. I am unsure whether the issue is linked to my installing the Paid Plans app or because Wix made changes to its platform, either way, something is going on in the back end, which I have no control over.

Here is one issue I am having (see the two troubleshooting videos here: https://www.essence-rooms.com/troubleshootingvideos)

IN SUMMARY
My Wix Code login script no longer works on Firefox and Safari, but it works perfectly on Google Chrome.

Please note NO CHANGES have been made to that code for many weeks and everything was working perfectly.

Upon consolling the login procedure on the three browsers, I notice new entries that were never there before, which is what leads me to believe Wix made some generic changes in the back end, which are affecting the site. Here is the output I get on console upon opening the webpage - clicking on the Login button - and submitting the correct username and pwd

CHROME

creating bolt instance 5698.094999999739
init.js:216 created bolt instance 7760.054999998829
main-base.js:8 finished hydrate 10781.239999996615
wixcode-worker.js:17 Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.
wixcode-worker.js:17 Loading the code for the HOME page. To debug this code, open czhbf.js in Developer Tools.
wixcode-worker.js:17 Failed to load initial data 
e.(anonymous function) @ wixcode-worker.js:17
(anonymous) @ wixcode-worker.js:17
r.error @ app.js:1
t.(anonymous function) @ app.js:7
errorReporter @ app.js:1
(anonymous) @ app.js:6
Promise.catch (async)
(anonymous) @ app.js:6
(anonymous) @ app.js:6
(anonymous) @ app.js:1
Ok @ app.js:6
(anonymous) @ app.js:1
e.exports @ app.js:6
qe @ app.js:6
(anonymous) @ app.js:6
e.exports @ app.js:6
(anonymous) @ app.js:1
createControllers @ app.js:1
r @ wixcode-worker.js:17
(anonymous) @ wixcode-worker.js:17
Promise.then (async)
(anonymous) @ wixcode-worker.js:17
(anonymous) @ wixcode-worker.js:17
(anonymous) @ lodash.min.js:67
(anonymous) @ wixcode-worker.js:17
(anonymous) @ wixcode-worker.js:17
(anonymous) @ wixcode-worker.js:17
o @ wixcode-worker.js:17
handle @ wixcode-worker.js:17
self.onmessage @ wixcode-worker.js:17
2googleMap.html:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at updateMap (googleMap.html:133)
    at saveMsgAndUpdateMap (googleMap.html:188)
updateMap @ googleMap.html:133
saveMsgAndUpdateMap @ googleMap.html:188
postMessage (async)
(anonymous) @ contentscript.js:1
console.js:35 Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.
console.js:35 Loading the code for the SERVICES page. To debug this code, open jobuh.js in Developer Tools.
raven.js:135 navigation-initialization: before init
raven.js:135 navigation-initialization: after init
raven.js:135 navigation-initialization: after register nav
raven.js:135 fallback-nav: doFallbackRedirect
raven.js:135 navigation-initialization: after redirect
raven.js:135 $routeChangeSuccess with:
scriptsIndex.js:2 event=
scriptsIndex.js:2 next=
scriptsIndex.js:2 current=

FIREFOX

Loading the code for the site. To debug this code, open masterPage.js in Developer Tools. wixcode-worker.js:17:146686 
Loading the code for the HOME page. To debug this code, open czhbf.js in Developer Tools. wixcode-worker.js:17:146686 
creating bolt instance 21380 init.js:196:20 
created bolt instance 22802 init.js:216:20 
finished hydrate 27369 main-base.js:8:4 
TypeError: a is null[Learn More] index.js:409 
Failed to load initial data Error: The current user does not have permissions to read on the Users collection. wixcode-worker.js:17:146686 
Firefox can't establish a connection to the server at wss://s-usc1c-nss-208.firebaseio.com/.ws?v=5&ns=wix-engage-visitors-prod-11. index.esm.js:10756:30 
No user is currently logged in wixcode-worker.js:17:146686 
TypeError: a is null[Learn More] index.js:409 
The connection to wss://wix-engage-visitors-prod-27.firebaseio.com/.ws?v=5 was interrupted while the page was loading. index.esm.js:10756:30 
The connection to wss://s-usc1c-nss-208.firebaseio.com/.ws?v=5&ns=wix-engage-visitors-prod-11 was interrupted while the page was loading. index.esm.js:10756:30 

SAFARI

[Log] creating bolt instance – 3433.4 (bolt-main-r.init.js, line 1)
[Log] created bolt instance – 3989.4 (bolt-main-r.init.js, line 1)
[Log] finished hydrate – 5260.6 (bolt-main-prod.js, line 3)
[Info] Loading the code for the site. To debug this code, open masterPage.js in Developer Tools. (wixcode-worker.js, line 17)
[Info] Loading the code for the HOME page. To debug this code, open czhbf.js in Developer Tools. (wixcode-worker.js, line 17)
[Error] Failed to load initial data – Error: The current user does not have permissions to read on the Users collection.
Error: The current user does not have permissions to read on the Users collection.
	(anonymous function) (wixcode-worker.js:17:146943)
	(anonymous function) (wixcode-worker.js:17:283033)
	(anonymous function)
	error (app.js:1:231160)
	(anonymous function) (app.js:7:46783)
	(anonymous function) (app.js:6:142823)
	a (wixcode-worker.js:17:87095)
	(anonymous function) (wixcode-worker.js:17:87240)
	c (wixcode-worker.js:1:36687)
	promiseReactionJob
[Log] No user is currently logged in (wixcode-worker.js, line 17)

Notice how Firefox and Safari state “No user is currently logged in” even though the login details are correct and working perfectly on Chrome.

Any help from the Wix team please?

I have a ticket opened with the support team already about the Paid Plans issue, while they are investigating, their initial response was to say that what I was experiencing was a “one off”, even though I later shared data from multiple users experiencing the same problem.

Here I am looking for help on the Wix Code side, but I can’t help suspect that the issues are related, given they appeared suddenly and unexpectedly, given that the site was working perfectly for a long time.

Just tried logging in to the site from an iPhone and the same exact problem happens. After submitting the username and password correctly, the login code does not kick in and nothing happens, like on Safari and Firefox on Mac

I have done some more testing and the problem persists also on Windows-based O/S.

Can Wix confirm whether there have been any changes made to the login API?

I had code just stop working on my site also after months of it successfully running.

WIX support team could not sort it so they have referred it to the WIX development team.

Still waiting to find out what they have changed.

Thanks for your input Mike. I have created a support ticket and the team there have been helpful. They tell me however, that Wix Code support is best found here. What i find frustrating is that the code in question is written as per the Wix tutorial and was working perfectly for a long time.
I can see items in the consile logs I never saw before, like “creating bolt instance” or “finished hydrate” and such, so it’s obvious Wix made some changes to the way they load sites.
I just wish someone from the Wix team here provided some input and support.

@oberdan Unfortunately so far, the Wix Team on the forum has been silent. Feel free to post your code on this other thread and see if we can help.

Thank you David, I am posting the code below hoping it helps me solve this, but I cannot believe this a coding issue for the following reasons:

  • it was working perfectly for months
  • nothing was changed to it on our side
  • even now, it works perfectly on Google Chrome v73
  • it fails to work on Firefox v60, Safari v11, Internet Explorer iPhone and Android

If it were a coding issue, would it not have malfunctioned since the beginning, and would it not malfunction on all browsers?

CODE
Here is the code associated to the Login button, which is associated to the OnClick behaviour assigned to the button via the Editor

export function loginButton_click() { 
 // if a user is already logged in
 if(wixUsers.currentUser.loggedIn) {
 // go to home page
  wixLocation.to("/");
 // log the user out
    wixUsers.logout()
      .then( () => {
 // and update buttons accordingly
    setButtons(true);
    } );
  }
 // if a user is already logged out
 else {
 let userId;
 let userEmail;
 
 // then prompt the user to log in 
    wixUsers.promptLogin( {"mode": "login"} )
      .then( (user) => {
        userId = user.id;
 return user.getEmail();
      } )
      .then( (email) => {
 // check if there is an item for the user in the collection
        userEmail = email;
 return wixData.query("Users")
          .eq("_id", userId)
          .find();
      } )
      .then( (results) => {
 // if an item for the user is not found
 if (results.items.length === 0) {
 // create an item
 const toInsert = {
 "_id": userId,
 "email": userEmail
          };
 // add the item to the collection
          wixData.insert("Users", toInsert)
            .catch( (err) => {
              console.log(err);
            } );
        }
 else
 // update buttons accordingly
        setButtons(true);
        wixLocation.to("/services");
      } )
      .catch( (err) => {
        console.log(err);
      } );
  }
}

Dear Wix team, I wonder what is happening behind the scenes. It’s been 6 days since I opened this ticket and no one has provided any input. The Wix customer service centre has provided no solving support either, maintaining the position that this is a coding issue or a local / one-off issue.
I just tested the login on Firefox, Safari, Chrome, iOs and Android, and as before only Chrome works.
Are there bigger platform issues? Has the Wix API gone mad all on its own? Did someone at Wix make changes to my code unbeknown to me?
I don’t know what to think and I am annoyed that Wix readily collect our payments and pester us with emails when credit cards expire and payments are missed, threatening discontinuation of service and such, and yet when we need your support on what seems a broad platform issue you retreat into complete radio silence.
I want my site to work smoothly as it used to. Please provide input.

They bricked some of wix code with a recient update, they have been gradually fixing certain elements of the code of the past few days. This may be what is affecting your site or it may be something else.

Wix need to make an official statement as to what exactly they done and what exactly it affects and stop keeping people in the dark.

Nearly 2 weeks already and still no official statement, very untrustworthy.

I’m having a similar issue. My website was running great and in the past few days started to get emails from users who registered with my website, but couldn’t purchase a paid plan membership (it was working great for the past few months). I went into troubleshooting mode and I noticed a bug where if a user clicks on a page that requires a paid plan, the app rightfully redirects them to purchase the plan. However, if the user navigates to another page and then returns to the page that requires a subscription, the app no longer redirects the user to purchase the membership - it just gets stuck! This is a HUGE problem, as I have users that are trying to purchase plans, but can’t! It used to work fine and I haven’t changed anything in the code!

I too noticed the “creating bolt instance” in the console and wonder what that’s all about? Last week, I installed the Site Booster app… and I thought perhaps it had something to do with that… but not sure.

This is EXTREMELY frustrating! I’m shocked that they would make all these changes behind the scenes without testing to see how our sites (their customers) would be affected!

I too opened a ticket. If you receive any updates, please share! @oberdan

Hello @aryjglantz , my ticket has been opened for weeks and I keep getting multiple versions of the story and the same limited set of answers, the current one being “it’s with our developers and we’ll let you know once it is solved”. I suspect they have no intention to let me know when it is solved.

My paid plans seem to behave for the moment, even though I did have a couple of small hiccups. The bigger problem is the fact that Wix Code on my site continues not to work as designed.

Curiously, I found that the Corvid login script is behaving in a very similar way to my site, i.e. after Login it does not redirect me appropriately, nor does it load my user navigation buttons until I refresh the page manually.

You can see the two videos of it at the top of this page https://www.essence-rooms.com/troubleshootingvideos

@yisrael-wix @yoav-wix The login code on the Corvid site curiously behaves with similar issues as on my site. You may want to investigate and hopefully let us know what’s going on.

I just had a client report the same problem I am having with the login. This means they were unable to complete the purchase they were logging in to complete…and so here go a few dollars flying out of my window.

Is anyone interested in joining forces to make our voices heard by Wix?

I am getting exasperated by the lack of coherent support and even more by the lack of progress and solutions. I am sure it does not help that every time an update is added to our Wix Support tickets they are handled by a new agent, who probably has no time to go through the history of the ticket and really understand the issue…otherwise, how would we explain the repetitive, scripted answers!!!

Our voices need to be heard, I am sick and tired of my business reputation and dollars flying out of the window because of Wix’s lack of support. If anyone wants to join forces, I’d love for us to do something that grabs their attention and finally has them communicate with us and solve these ongoing issues.

@Oberdan
Ya it’s like amature hour over there at wix. I mean what wix support manager though it was a good idea to have 10 different employees answering 1 query. Very poor management system they are running over there. They need to employee experienced staff to answer queries also, they are lacking in that department at the moment.

It took me forever to talk to one of them about an issue I was facing and the only way I got them to respond was through the main post on the thread, I got them to finally answer a question that I had for a whole month, I would recommend doing the same

Please check if the issue persists. I believe we’ve located and fixed the problem.

@ohad-laufer thank you! I received comms from the Wix Support team that the issue was fixed. I tested all browsers and mobiles and the login script is now working as expected.

I also got a separate email from Wix Support stating: “To clarify, the issue is present on Safari specifically when using the Member login and is not specific to your sites but is an issue in general across Wix sites depending on a few factors.”

I am delighted Wix owned the issue eventually. I am exhausted, however, from weeks and weeks of being told that the problem was with my browsers version, or my code…and, like a dog with a bone, feeling unable to let it go and constantly pushing back to have it assessed by the competent team for what it really was.

Now, I am keeping an eye on the Paid Plans, which were erroneously subtracting sessions from the counter and hoping that the fix that Wix applied also positively impacts the issue with the Paid Plans on my site.

All is well that which ends well and for now I am pleased my clients can use my site again. :pray:t3:

Glad someone was able to get their site login fixed, Cause i have the exact same issue and have been getting the runaround from wix for 2 weeks now. i am losing thousands of dollars a week cause Wix can’t get their crap together.

I’ve found support on the Experts forum to be much faster and reliable when it comes to escalating issues. Ultimately it appears to be down to who is managing communications where.

What’s the issue you’re having?