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

Data Connect extension login flow broken in GitHub Codespaces #8123

Open
markgoho opened this issue Jan 20, 2025 · 3 comments
Open

Data Connect extension login flow broken in GitHub Codespaces #8123

markgoho opened this issue Jan 20, 2025 · 3 comments
Labels
reproducible type: bug VSCode Extension https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.firebase-dataconnect-vscode

Comments

@markgoho
Copy link

markgoho commented Jan 20, 2025

[REQUIRED] Environment info

firebase-tools: n/a

Platform: GitHub Codespaces

[REQUIRED] Test case

The minimal test case is a new repo with the extension installed running in Codespaces

[REQUIRED] Steps to reproduce

Create repo in GitHub, open in Codespaces
Add Data Connect Extension
Try to "Sign in With Google"

[REQUIRED] Expected behavior

Extension recognizes it doesn't have a way to redirect to localhost based on ENV variables

[REQUIRED] Actual behavior

Login flow silently fails

Additional info:

from the console after clicking sign in:

[Extension Host] 
console.ts:137 [Extension Host] Visit this URL on this device to log in:
console.ts:137 [Extension Host] https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=451316227&redirect_uri=http%3A%2F%2Flocalhost%3A9012
console.ts:137 [Extension Host] 
console.ts:137 [Extension Host] Waiting for authentication...
log.ts:445   ERR spawn xdg-open ENOENT: Error: spawn xdg-open ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page Tunnel factory called {remoteAddress: {…}, localAddressPort: 9012, privacy: undefined, public: undefined, protocol: undefined}
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page Creating or reusing http/9012 with privacy 'private', attempt 0
commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1 Refused to set unsafe header "User-Agent"
(anonymous) @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
j @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
(anonymous) @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
xhr @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
at @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
_request @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
request @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
(anonymous) @ commons-app~bootstrap~pfHelper-axios.cjs.f1e8e9a2227c8fff59da.js:1
axiosRequest @ commons-app~bootstrap~pfHelper-tunnelManagementHttpClient.js.b1ad2c0688fecfd25d68.js:1
request @ commons-app~bootstrap~pfHelper-tunnelManagementHttpClient.js.b1ad2c0688fecfd25d68.js:1
sendTunnelRequest @ commons-app~bootstrap~pfHelper-tunnelManagementHttpClient.js.b1ad2c0688fecfd25d68.js:1
await in sendTunnelRequest
createTunnelPort @ commons-app~bootstrap~pfHelper-tunnelManagementHttpClient.js.b1ad2c0688fecfd25d68.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ 644.357904918e6f9d8132a5.js:1
(anonymous) @ 644.357904918e6f9d8132a5.js:1
n @ 644.357904918e6f9d8132a5.js:1
t.withRetries @ 644.357904918e6f9d8132a5.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i @ app.c320a563c3f6fc7149d3.js:1
withTunnelManagementClient @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i @ app.c320a563c3f6fc7149d3.js:1
createOrReuseTunnelPort @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i @ app.c320a563c3f6fc7149d3.js:1
forwardPort @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i @ app.c320a563c3f6fc7149d3.js:1
S.tunnelFactory @ app.c320a563c3f6fc7149d3.js:1
forwardPort @ tunnelFactory.ts:56
G @ tunnel.ts:501
F @ tunnelService.ts:35
openTunnel @ tunnel.ts:366
gb @ tunnelModel.ts:726
await in gb
forward @ tunnelModel.ts:703
forward @ remoteExplorerService.ts:202
D @ remoteExplorer.ts:739
await in D
F @ remoteExplorer.ts:800
B @ event.ts:1243
C @ event.ts:1254
fire @ event.ts:1278
setCandidates @ tunnelModel.ts:894
await in setCandidates
onFoundNewCandidates @ remoteExplorerService.ts:248
$onFoundNewCandidates @ mainThreadTunnelService.ts:168
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1243
fire @ event.ts:1274
fire @ ipc.net.ts:652
A @ ipc.net.ts:1022
(anonymous) @ ipc.net.ts:879
B @ event.ts:1243
fire @ event.ts:1274
acceptChunk @ ipc.net.ts:394
(anonymous) @ ipc.net.ts:350
(anonymous) @ browserSocketFactory.ts:231
B @ event.ts:1243
fire @ event.ts:1274
(anonymous) @ app.c320a563c3f6fc7149d3.js:1
i.emit @ 644.357904918e6f9d8132a5.js:1
L @ commons-app~bootstrap~pfHelper-_stream_readable.js.91b6c073cb2a86a37363.js:1
E @ commons-app~bootstrap~pfHelper-_stream_readable.js.91b6c073cb2a86a37363.js:1
k.push @ commons-app~bootstrap~pfHelper-_stream_readable.js.91b6c073cb2a86a37363.js:1
(anonymous) @ 644.357904918e6f9d8132a5.js:1
invoke @ 644.357904918e6f9d8132a5.js:1
fire @ 644.357904918e6f9d8132a5.js:1
handleDataReceived @ commons-app~bootstrap~pfHelper-sshChannel.js.aaf46a7081df1b07daf9.js:1
handleDataMessage @ 644.357904918e6f9d8132a5.js:1
handleMessage @ 644.357904918e6f9d8132a5.js:1
handleMessage @ commons-app~bootstrap~pfHelper-sshSession.js.e1b750f91dd2c06aba0a.js:1
processMessages @ commons-app~bootstrap~pfHelper-sshSession.js.e1b750f91dd2c06aba0a.js:1Understand this errorAI
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page Created port http/9012 with privacy 'private'
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page:workbench:vscs:web-client:603a:codespaces-component:workbench-page:workbench:vscode-workbench:providers:dev-tunnel-external-uri-provider Getting external URI for qF {scheme: 'http', authority: '127.0.0.1:9012', path: '/', query: '', fragment: '', …}
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page Creating or reusing undefined/9012 with privacy 'undefined', attempt 0
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page http/9012 already exists with privacy 'private' so reusing the existing port
644.357904918e6f9d8132a5.js:1 vscs:web-client:603a:codespaces-component:workbench-page:workbench:vscs:web-client:603a:codespaces-component:workbench-page:workbench:vscode-workbench:providers:dev-tunnel-external-uri-provider Using primary port forwarding URI qF {scheme: 'https', authority: 'animated-doodle-44xr7vjxgqhx77-9012.app.github.dev', path: '/', query: '', fragment: '', …}
@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@markgoho
Copy link
Author

It seems this problem doesn't exist in IDX. IDX seems to recognize that the extension needs to access Google Cloud account info and automatically prompts me to allow access.

@aalej aalej added the VSCode Extension https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.firebase-dataconnect-vscode label Jan 20, 2025
@aalej
Copy link
Contributor

aalej commented Jan 21, 2025

Thanks for reporting this, @markgoho! I'm able to reproduce the error. As you mentioned, no issues occur when using IDX, but the login flow is not successful in Codespaces. I'll raise this to our engineering team.

As a workaround, you should be able to login by running firebase login --no-localhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reproducible type: bug VSCode Extension https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.firebase-dataconnect-vscode
Projects
None yet
Development

No branches or pull requests

3 participants