firebase / firebase/firebase-tools
Data Connect extension login flow broken in GitHub Codespaces
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [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:
```console
[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: '', …}
```
Contributor guide
Assessment
This issue has not been assessed yet.