Help on authentication.register from wix-members-backend

Hi!

I had a working register members code but suddenly, its stops working.
Below are my codes:

application-end:

import {myRegisterMemberFunction} from 'backend/autoRegisterMembers.jsw';

$w.onReady(function () {
    $w('#applyBtn').onClick(function () {
        let emailP = $w('#emailAddP').value;
        let passwP = $w('#passWordP').value;
        let fName = $w('#firstNameP').value;
        let lName = $w('#lastNameP').value;
        let options =  { 
            contactInfo: {
            firstName: $w('#firstNameP').value,
            lastName: $w('#lastNameP').value
            },
            privacyStatus: 'PUBLIC'
        };
        myRegisterMemberFunction(emailP,passwP,options)
        .then((registrationResult) => {
           let userID = registrationResult.member._id;
           console.log(userID);
        })
        .catch((error) => {
           console.log(error);
        });
    }
}           

back-end:

import { authentication } from 'wix-members-backend';

export function myRegisterMemberFunction(eMail, passWord, oPtions) {
  console.log("autoRegisterMembers: registering info below:");
  console.log("Email: " + eMail);
  console.log("Password: " + passWord);
  
  return authentication.register(eMail, passWord, oPtions)
    .then((registrationResult) => {
      return registrationResult;
    })
    .catch((error) => {
      console.log('Error on autoRegisterMembers: ' +error);
    });
}

Its producing this error: “Error on autoRegisterMembers: Error: Not Found: the requested item no longer exists.”

The error is at the this part in the back-end:

return authentication.register(eMail, passWord, oPtions)
    .then((registrationResult) => {

Any help is much appreciated!

Thanks!

I’m running into this same issue with code that was working prior to today. It looks like it’s an issue on Wix’s end with the API.

This adds only another problem onto the members API alongside the token issue that has been there for over a month:

This sucks! Wix codes just keeps getting broken…

Same problem here with the wix-members-backend > Authentication > login( )

Also the " Not Found: the requested item no longer exists. " error when trying to register users. (This code worked 12 hours ago - so something broken on wix’s end)

Still running into this issue, hopefully, this one doesn’t drag on for more than a month like some of the other API issues :grin: If you’re running into this issue, please reach out to support so we can get this taken care of.

Having the exact same issue. Use wixUsersBackend . register() until somebody will understand that it needs to be fixed or suggest something else.

Hello, there are reports of this API having issues. Please reach out to customer care to add your report and for more information on the status.

I have reached out, but no reply or acknowledgement from wix for 3 days already.

That is likely due to the New Year holiday and many folks being off. If you do not hear this week, please let me know the ticket number so I can see if I can follow up internally

@amandam , I’ve reached out about this issue ~ a month ago with no real follow up other than “we’re looking into it”. This is insane and should be moved to the top of the priority list over there.

I definitely understand your frustration, can you pass me your ticket number so I can pass this along from my end as well?

I spent HOURS trying to understand why this suddenly stopped working on my site. I eventually concluded if was an API bug and submitted a support ticket. Wix support never actually put any effort into addressing my support ticket. It was just the typical automated ‘here are links to the documentation’ stuff. It would be nice for them to at least acknowledge what I was seeing.

While I was waiting for response, I was able to code up a workaround:
I noticed the registration did actually go though despite the API returning an error. So I would run the registration again. The error on the second attempt included the member ID which I could use to reference the newly created member.

In my case, I just replaced it with the authentication on wix-members.
It just sucks that Wix’s APIs are very fragile.

You can use mine as well - 1686145313. The response was that it works, but this is since I’ve changed my code to use the old API (wixUsers)