Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser based authentication does not work with devcontainer #698

Open
KavanShaban opened this issue Mar 29, 2023 · 3 comments
Open

Browser based authentication does not work with devcontainer #698

KavanShaban opened this issue Mar 29, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request tracked Already in Backlog

Comments

@KavanShaban
Copy link

Your environment

OS : Debian GNU/Linux 11 (bullseye)
Node.js version : v18.15.0
suitecloud-cli version : 1.7.0
Terminal/CMD tool : bash

Describe the bug

I am attempting to run the SuiteCloud vscode extension in a devcontainer. The extension installs fine and I am able to create an account customization project. However, when attempting to setup the account for the project using browser based authentication I get the following error:
Web browsing is not supported on this system.

The error occurs both from the vscode command palette and by using the command suitecloud account:setup

To Reproduce

Steps to reproduce the behavior:

  1. Create a devcontainer using the following configuration in the .devcontainer/devcontainer.json file:
{
	"name": "SuiteCloud-1",
	"image": "mcr.microsoft.com/devcontainers/java:0-17",
	"features": {
		"ghcr.io/devcontainers/features/java:1": {
			"version": "17",
			"jdkDistro": "oracle",
			"gradleVersion": "latest",
			"mavenVersion": "latest",
			"antVersion": "latest"
		},
		"ghcr.io/devcontainers/features/desktop-lite:1": {
			"version": "latest",
			"noVncVersion": "1.2.0",
			"password": "vscode",
			"webPort": "6080",
			"vncPort": "5901"
		},
		"ghcr.io/devcontainers/features/node:1": {
			"nodeGypDependencies": true,
			"version": "18"
		}
	},
	"customizations": {
		"vscode": {
			"extensions": [
				"Oracle.suitecloud-vscode-extension"
			]
		}
	}
}
  1. Run suitecloud account:setup
  2. Select Browser-based authentication.
  3. Enter any valid value for the authentication id
  4. You will encounter the following error: Web browsing is not supported on this system.

Attempts to fix

We attempted to fix this by enabling the desktop-lite feature as detailed at https://github.com/devcontainers/features/tree/main/src/desktop-lite#example-usage

Also looks like the use of something like xdg-utils in the cli could fix this issue as detailed at microsoft/vscode-remote-release#3540 (comment)

Another alternative used by Microsoft and Salesforce toolchains is to fallback to showing the url or adding the option to display the url so the developer can cut and paste it when they are running in a container.

Additional context

Not being able to use a devcontainer is a real hinderance to the development cycle and onboarding new developers. Thanks in advance

@KavanShaban KavanShaban added the bug Something isn't working label Mar 29, 2023
@Montsant19
Copy link
Member

Hello, @KavanShaban. You can use the TBA token authentication instead. Refer to this topic for more information: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_160147609118.html

@dbaghdanov
Copy link

Came here to complain about this same problem. We use devcontainers with aws projects which need to open a browser to authenticate with sso just fine. And AWS also has a fallback which prints a url and code to copy/paste into a browser manually.

Looking for something similar in NetSuite.

@tourajvaziri
Copy link

Hello @dbaghdanov, we have provided two different commands for setting up an account. One is account:setup which is used for environments that can open a browser. The other one is account:savetoken and is used for environments that cannot open a browser such as a container.
That said we will look into the fallback method used by AWS and others. Thanks for letting us know!

@davidecorreu davidecorreu added enhancement New feature or request and removed bug Something isn't working labels May 9, 2023
@tourajvaziri tourajvaziri added the tracked Already in Backlog label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tracked Already in Backlog
Projects
None yet
Development

No branches or pull requests

5 participants