Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Add GitPod support #300

Merged
merged 4 commits into from
Apr 3, 2020
Merged

Add GitPod support #300

merged 4 commits into from
Apr 3, 2020

Conversation

vgrichina
Copy link
Contributor

@vgrichina vgrichina commented Apr 1, 2020

@mikedotexe
Copy link
Contributor

Hm, this might have been a glitch with Gitpod, but I ran into an issue.
When I opened this in Gitpod, I went to the Theia Terminal and ran:
./bin/near login

A prompt came up asking me how I wanted to open it. There were three options. "Make public, preview, or open in browser" I chose "open in browser"
A new tab opened and I saw this:
Screenshot 2020-04-01 15 04 50

Then I reloaded that page (thinking that Gitpod might have needed a moment to load) and I saw the success message immediately, even though I hadn't logged into an account.

You are logged in. Please close this window.

Then back in Gitpod it reads:

The account you provided [ undefined ] has not authorized the expected key [ ed25519:8bwaTu... ] Please try again.

@mikedotexe
Copy link
Contributor

Yeah something seems to be awry here. I tried stopping the Gitpod workspace instance and restarting it. (Note that when a link tries to open in Gitpod, it'll ask you a prompt and can save your choice for later for certain prompts)
This time I clicked the "make public" option when running ./bin/near login
And it then gives me this option:

Screenshot 2020-04-01 15 12 13

I tried both of the options and am still getting the same behavior as the earlier comment.

@vgrichina
Copy link
Contributor Author

@mikedotexe I see, I think the problem is that server gets immediately stopped once you visit the page (no matter whether you got redirected there or opened yourself as in your case).

I think I'll just add smth to GitPod config to avoid this popup (everything works well if you don't click any of these).

@mikedotexe
Copy link
Contributor

I'm still seeing that popup asking me to open it in preview or a browser tab.

Screenshot 2020-04-01 17 31 36

I can, however, ignore that and cmd + click on the link in the Terminal and it will work until I re-enter my account name. Then I get:
Screenshot 2020-04-01 17 33 21

Is there a different path I'm supposed to be following here? Seems like the average Gitpod user will be quite confused by the UX presented at this moment.

@vgrichina
Copy link
Contributor Author

@mikedotexe I'm debugging for now, this is definitely not the UX that is supposed to stay

@vgrichina
Copy link
Contributor Author

@mikedotexe try now. Should generally work fine both in popup/preview/blocked popup.

However looks we are hitting some wallet bug where redirect URL is sometimes forgotten, digging more into it.

@vgrichina
Copy link
Contributor Author

looks we are hitting some wallet bug where redirect URL is sometimes forgotten, digging more into it.

Seems like it's just been this error:

Error: Transaction HebBhYF4sNUyMdfh3HNDa1b6GXc4Xfi9PXoshj54ZyTb failed. The public key ed25519:2QK2j76EhVwNkAvz1TmnHZYWnngYpKt5L3wM6mUsWEBZ is already used for an existing access key

Tracked here near/near-wallet#429

} catch (e) {
console.log('Unexpected error: ', e);
console.error('Unexpected error: ', e);
res.statusCode = 400;
res.end('It\'s a scam!');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whaaaa 😆

Copy link
Contributor

@mikedotexe mikedotexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works super good now 💥

@vgrichina vgrichina merged commit 0a5705a into master Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants