google / google/neuroglancer

Bug: Brainmaps API requests result in error code 401

Open
#1,079 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
389
Avg merge
3d 21h
Merged PRs (30d)
3

Description

Starting today, I can no longer view data via the Google Brain Maps API on https://neuroglancer-demo.appspot.com. As of now, the deployed version is: https://github.com/google/neuroglancer/commit/a345705eb47b1d797a8dfb54ad17719584c303a2

Specifically, when adding a raw layer from a brainmaps:// source:
1. Neuroglancer shows the "Request login." button.
2. The Safari JavaScript console shows: "[Error] Blocked a frame with origin "https://neuroglancer-demo.appspot.com" from accessing a frame with origin "https://accounts.google.com". Protocols, domains, and ports must match."
3. After pressing the "Request login" button, the same dialog and button is shown again. Steps 1--3 can be repeated multiple times.
4. The UI and JavaScript console show: "[Error] Failed to load resource: the server responded with a status of 401 () (meshes, line 0)" for the resource "https://brainmaps.googleapis.com/v1beta2/objects/OBJECT_ID_OF_RAW_LAYER/meshes".

I find it surprising that Neuroglancer is trying to get the `/meshes` endpoint for a raw layer. ~~However, the authentication issue is presumably due to the error in step 2.~~

Actually, the authentication seems to work. In the "new layer" dialog, after typing "brainmaps://", a "Request login" button is shown. Pressing this button then produces the list of projects and datasets.

Additional context:
- The problem phenotype can be reproduced in Google Chrome, but without an error message equivalent to step 2.
- Viewing raw layers still worked around 24 hours ago.

Contributor guide

Open the contributing guide

Research direction

Start from the deployed Neuroglancer commit a345705eb47b1d797a8dfb54ad17719584c303a2 and reproduce adding a raw layer from a brainmaps:// source in Chrome or Safari. Inspect the login flow and the brainmaps.googleapis.com /v1beta2/objects/.../meshes request; done means raw layers load without repeated login prompts or a 401 response.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.