githubocto / flat-editor

A VSCode extension to create Flat GitHub Actions
https://marketplace.visualstudio.com/items?itemName=githubocto.flat
MIT License
43 stars 2 forks source link

Won't Load UI #9

Closed grempe closed 2 years ago

grempe commented 3 years ago

I've just installed Flat Editor, but I can't get past the initialization step. It always hangs, and displays no UI. I only see a new tab for 'flat.yml (Working Tree)' and a blue loading bar that slides from left to right forever.

Trying to debug I tried installing an older version of the extension, I tried disabling ALL extensions but this one, and nothing worked. Same result. VS Code console shows a number of entities being downloaded, all with HTTP 200 responses.

I've also deleted the .github folder a number of times to reset with no change on init.

The flat.yml file does have some contents.

❯ cat flat.yml 
name: data
on:
  schedule:
    - cron: 0 0 * * *
  workflow_dispatch: {}
  push:
    paths:
      - .github/workflows/flat.yml
jobs:
  scheduled:
    runs-on: ubuntu-latest
    steps:
      - name: Setup deno
        uses: denolib/setup-deno@v2
      - name: Check out repo
        uses: actions/checkout@v2

Stuck.

Screen Recording 2021-05-19 at 01 02 24

mattrothenberg commented 3 years ago

Hi @grempe, sorry to hear you're having trouble with the extension. We're having trouble reproducing this on our end, so could you tell us:

Screen Shot 2021-05-20 at 11 21 47 AM

Additionally, when the webview is in that hanging state, could you check the webview developer tools console for errors via the command palette (which you can open by pressing cmd+p and typing "webview")

Screen Shot 2021-05-20 at 11 24 32 AM
grempe commented 3 years ago

VS Code : 1.56.2 (latest) macOS Big Sur : 11.3.1

The "Open Webview Developer Tools" action had no effect on my system. I think this is probably why:

https://stackoverflow.com/questions/67327632/open-webview-developer-tools-not-working-in-vs-code-1-56

I disabled ALL extensions in VS Code. Then re-enabled only yours.

I still see the hanging behavior, and no output in the 'OUTPUT' tab of the console, and no interesting output in 'Help > Toggle Developer Tools'

The hanging page (flat.yml) is accompanied only by a blue progress loading indicator at the top of the page that just slides left to right forever.

I can never open that file flat.yml to view it within VS Code. Every try to open it just hangs the same way. However, if I uninstall the extension and click the reload button I can then open flat.yml as a normal yaml file (with the contents I showed above).

Let me know if there is something else you want to test.

Re-installation of the extension once again makes it impossible for me to open flat.yml without a hanging doc. However, if I copy the contents of flat.yml in a terminal and paste it into a new doc foo.yml I am able to open and view a syntax highlited yaml file as expected.

mattrothenberg commented 3 years ago

Got it! I wish I understood why "Open Webview Developer Tools" has no action on your system.

We're on the same version of VS Code and MacOS and it seems to work on my end 🤔 .

https://user-images.githubusercontent.com/5148596/119016155-9f480780-b967-11eb-8f48-909b2178b896.mov

We will keep digging into where a possible error might be happening. Stay tuned!

grempe commented 3 years ago

https://github.com/microsoft/vscode/issues/108395

"This command will only work if a webview exists (and is visible)"

Since your webview may not in fact yet exist on my system (failing to load?) it won't show?

mattrothenberg commented 3 years ago

Quite possibly, yes!

That said, we've encountered similar "hanging" issues during the development process and they almost always came down to an uncaught Javascript exception that was visible in the console (and hence present when we inspected the webview via the command).

grempe commented 3 years ago

FYI : https://code.visualstudio.com/api/extension-guides/webview#inspecting-and-debugging-webviews

I was trying again and I did see this. I can't tell from the trace if its from your extension or not:

Image 2021-05-20 at 12 46 19

mattrothenberg commented 3 years ago

I see the same information in my console. The webview loads OK, errors/messages notwithstanding.

grempe commented 3 years ago

The network tab only shows a single file being requested.

Image 2021-05-20 at 12 50 23

But I did see this other error which seems pertinent on reopen with code . (and before I tried to do anything with the webview, and the flat.yaml and its parent folders had been deleted before re-opening).

Image 2021-05-20 at 12 52 03

grempe commented 3 years ago

Clicking on log.ts in that view shows:

Image 2021-05-20 at 12 55 14

grempe commented 3 years ago

I'm curious, are you running from your dev environment to test it (running from source code?) Or are you using the extension installed on a clean system as a regular user would do?

mattrothenberg commented 3 years ago

Great question! I'm having trouble reproducing this:

jlee0831 commented 3 years ago

I'm facing this issue as well, could it be related to my computer being an M1 Silicon macbook pro?

grempe commented 3 years ago

The system I used when reporting this is an Intel macbook pro. I gave up on the UI and just did it manually.

daviddossett commented 2 years ago

Having the same issue intermittently. M1 MacBook Pro.

mattrothenberg commented 2 years ago

@grempe Very late follow-up here, but I was curious if you ever found a solution for this issue? On our side, we did end up finding and fixing two issues (https://github.com/githubocto/flat-editor/pull/18 and https://github.com/githubocto/flat-editor/pull/19) where the webview would hang if you ran "Initialize Flat YML" in a directory that:

If you wouldn't mind, could you give version 0.23.0 a whirl and let me know if this fixes your issue? Thank you!

grempe commented 2 years ago

No, I didn't. I abandoned it and went my own direction based on apparent lack of interest in fixing it.

Sorry, no time to double back on this issue.