Picture of Vijay Kumar
Error: Failed to determine user's tenant
by Vijay Kumar - Saturday, 15 February 2020, 7:24 PM
 

For the authoring tool, I see the error displayed below, after I login to localhost:5000. It seems like it disappears on its own after several minutes and I'm able to see the course inside the authoring tool. Does anyone know why this error is displayed?

Error: Failed to determine user's tenant!

    at Object.getDatabase (C:\adapt_authoring\lib\database.js:416:19)
    at C:\adapt_authoring\plugins\content\tag\index.js:76:16
    at C:\adapt_authoring\lib\rest.js:115:7
    at Layer.handle [as handle_request] (C:\adapt_authoring\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\adapt_authoring\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (C:\adapt_authoring\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\adapt_authoring\node_modules\express\lib\router\layer.js:95:5)
    at C:\adapt_authoring\node_modules\express\lib\router\index.js:281:22
    at Function.process_params (C:\adapt_authoring\node_modules\express\lib\router\index.js:335:12)
    at next (C:\adapt_authoring\node_modules\express\lib\router\index.js:275:10)
    at Layer.handle [as handle_request] (C:\adapt_authoring\node_modules\express\lib\router\layer.js:91:12)
    at trim_prefix (C:\adapt_authoring\node_modules\express\lib\router\index.js:317:13)
    at C:\adapt_authoring\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\adapt_authoring\node_modules\express\lib\router\index.js:335:12)
    at next (C:\adapt_authoring\node_modules\express\lib\router\index.js:275:10)
    at C:\adapt_authoring\lib\permissions.js:495:16
    at Layer.handle [as handle_request] (C:\adapt_authoring\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\adapt_authoring\node_modules\express\lib\router\index.js:317:13)
    at C:\adapt_authoring\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\adapt_authoring\node_modules\express\lib\router\index.js:335:12)
    at next (C:\adapt_authoring\node_modules\express\lib\router\index.js:275:10)
    at SendStream.error (C:\adapt_authoring\node_modules\serve-static\index.js:121:7)
    at SendStream.emit (events.js:223:5)
    at SendStream.EventEmitter.emit (domain.js:475:20)
    at SendStream.error (C:\adapt_authoring\node_modules\send\index.js:270:17)
    at SendStream.onStatError (C:\adapt_authoring\node_modules\send\index.js:421:12)
    at next (C:\adapt_authoring\node_modules\send\index.js:735:16)

    at onstat (C:\adapt_authoring\node_modules\send\index.js:724:14)

Picture of Ailiniyazi Maimaiti
Re: Error: Failed to determine user's tenant
by Ailiniyazi Maimaiti - Monday, 17 February 2020, 9:49 AM
 

Hi Vijay,

I guess something went wrong for the user during the installation.

I would recommend connecting MongoDB then check the user's Information, especially the email address.

Picture of Vijay Kumar
Re: Error: Failed to determine user's tenant
by Vijay Kumar - Monday, 17 February 2020, 4:30 PM
 

Hi Ailiniyazi, 

Thanks for your response. Here's what my user information in the MongoDB looks like:

User object

Here's what the tenant looks like: 

 

Tenant object

Not sure where the error is occurring because the authoring tool starts working after 15 minutes. 

Thanks for any help.

Picture of Ailiniyazi Maimaiti
Re: Error: Failed to determine user's tenant
by Ailiniyazi Maimaiti - Monday, 17 February 2020, 4:54 PM
 

Hey Vijay,

 

I just new installed Adapt Authoring Tool v0.10.2 with framework v5.1.0, I got the same error with you.

 

Picture of Vijay Kumar
Re: Error: Failed to determine user's tenant
by Vijay Kumar - Monday, 17 February 2020, 5:35 PM
 

Those are the same versions as mine. Someone else had also installed the same versions using the default settings of the "node install" step and got the same error. 

Do you know an earlier version of the tool and framework that don't have this issue?

Thanks,

Vijay

Picture of Ailiniyazi Maimaiti
Re: Error: Failed to determine user's tenant
by Ailiniyazi Maimaiti - Tuesday, 18 February 2020, 8:21 AM
 

Hello Vijay,

 

in the previous versions ich haven't have this kind of issue, what is funny that it works fine now, the error I got tomorrow

Picture of Jonathan Briggs
Re: Error: Failed to determine user's tenant
by Jonathan Briggs - Tuesday, 18 February 2020, 5:58 PM
 
I've just hit this error too. I thought it'd be a node version issue but after lots of messing around I can be fairly sure it's not. Basically the install goes fine but when you log in with the super user credentials the dashboard, assets and user management sections are blank in the app. Does anyone have ideas on what the issue is? Jonathan
Picture of Vijay Kumar
Re: Error: Failed to determine user's tenant
by Vijay Kumar - Tuesday, 18 February 2020, 6:37 PM
 

@Aliniyazi That's exactly what's happening with me. It starts working after a time delay. 

@Jonathan I have also installed and uninstalled the tool, authoring framework and the associated software. It's still happening. I can only guess that it's a bug that needs fixing.

Picture of Jonathan Briggs
Re: Error: Failed to determine user's tenant
by Jonathan Briggs - Wednesday, 19 February 2020, 9:16 AM
 

in case anyone hasn't seen it, there's a workaround posted here:
https://github.com/adaptlearning/adapt_authoring/issues/2504

run that in the adapt_authoring directory. Works for me

Picture of Vijay Kumar
Re: Error: Failed to determine user's tenant
by Vijay Kumar - Wednesday, 19 February 2020, 8:45 PM
 

@Jonathan 

Thanks for the info. 

Yes, running the following command inside the directory where the authoring tool was installed does fix the error for me: npm install mongoose@5.8.13