iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
600 stars 210 forks source link

Linux Desktop Authentication Error #1841

Closed rickhewes closed 2 years ago

rickhewes commented 4 years ago

Hi,

Just trying out iModel.js and having problems on linux. I would expect the desktop-starter to work out of the box. It does on Windows but on Linux (Fedora 32) I have the following issue.

Screenshot from 2020-07-20 09-29-20

Any help appreciated!

Cheers,

Rick.

tommywu052 commented 4 years ago

I'm trying to run desktop starter on win10, but failed as the attached. not sure what's the problem here. npm start ----

10 silly lifecycle desktop-starter@1.0.0~build: Args: [ 10 silly lifecycle '/d /s /c', 10 silly lifecycle 'npm run build:backend && cross-env USE_FAST_SASS=true npm run build:frontend && npm run copy' 10 silly lifecycle ] 11 silly lifecycle desktop-starter@1.0.0~build: Returned: code: 1 signal: null 12 info lifecycle desktop-starter@1.0.0~build: Failed to exec build script 13 verbose stack Error: desktop-starter@1.0.0 build: npm run build:backend && cross-env USE_FAST_SASS=true npm run build:frontend && npm run copy 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid desktop-starter@1.0.0 15 verbose cwd D:\a9\adt\desktop-starter 16 verbose Windows_NT 10.0.19041 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" 18 verbose node v12.18.3 19 verbose npm v6.14.6

calebmshafer commented 4 years ago

@rickhewes the desktop-starter should work out of the box for linux distros based on at least debian 9, which is the officially supported iModel.js distro. We'll need to look into what the issue is with Fedora 32.

From the error message it looks related to our Desktop OIDC sign-in setup, are you able to open a snapshot iModel without sign-in?

cc: @ramanujam-raman

calebmshafer commented 4 years ago

@tommywu052 would you mind opening a separate issue for this? It doesn't seem related to this issue. Also can you include the exact steps you're following when creating the new issue. Thanks!

pmconne commented 3 years ago

@ramanujam-raman this error remains reproducible on Linux (Ubuntu 20.04 here), with both imodeljs 2.11 and 2.12. Do you know what getPassword function it is even trying to call?

calebmshafer commented 3 years ago

@pmconne that function calls into @bentley/imodeljs-native code to get the password using KeyTar. Currently our implementation of KeyTar does not support Linux. We have it on the backlog but no timeline on it yet.

calebmshafer commented 3 years ago

I am going to move this issue over to the iModel.js repo to be better tracked with the source as this isn't an issue with the Desktop Starter explicitly.

calebmshafer commented 2 years ago

@rickhewes this issue has been addressed in iTwin.js 3.0 and desktop apps should now work on Linux. Any desktop app using our Electron auth client will lack support for caching a password forcing you to sign-in each time the app is started. However, support for caching on Linux is in progress here.

If you'd like to try it out, please give the release candidate of 3.0, details here.

aruniverse commented 2 years ago

Closing as the issue has been initially addressed with the 3.0 release; and theres been no update from the user since.