Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

⬆️ Electron@6.1.12 #20764

Closed
wants to merge 34 commits into from
Closed

⬆️ Electron@6.1.12 #20764

wants to merge 34 commits into from

Conversation

lkashef
Copy link
Contributor

@lkashef lkashef commented May 20, 2020

MOVED TO #21079

@lkashef
Copy link
Contributor Author

lkashef commented May 20, 2020

General testing

  • Review issues tagged with electron to see if any of them are fixed
  • Review any comment in the Atom code that contains the keyword TodoElectronIssue to see if any of them can be resolved (search link).
    • The changes seems to be just a bit of code enhancement that I am not sure it's a top priority for now
  • Verify that you can collaborate with Teletype
    • Host using Atom's current stable release can collaborate with guest using Atom with the new version of Electron
    • Guest using Atom's current stable release can collaborate with host using Atom with the new version of Electron
    • Host and guest can collaborate when both are using Atom with the new version of Electron
    Steps 1. Open a file 1. Share a portal 1. Have a guest join the portal 1. When guest edits the text in the file, verify that the host sees those changes

Check for regressions experienced in previous upgrades

Text Input/Keybindings

See how to setup keyboard layouts.

  • IME not working (1.19.0-beta2: Cursor stucks at the first letter when using macOS Chinese IME #14911)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Install an IME layout, for example Pinyin simplified
    2. Open Atom and use the layout you installed as the keyboard layout
    3. Example, if you picked Pinyin simplified type in zhongwenshuru

    Expected: in Pinyin simplified 中文输入 is expected

    gif

    Issues we've seen: Only shows latin first character and not every character typed.

    gif

  • macOS: Key binding with composition characters are ignored (key-mappings with alt don't suppress Mac OS composition characters anymore (atom-1.19) #15189)

    Repro steps
    1. Open your keymap.cson file and add the following:
      'atom-text-editor':
        # use hjkl; vim-like when pressing alt (word by word, paragraph by paragraph)
        # or alt (letter by letter)
        'alt-h': 'core:move-left'
        'alt-j': 'core:move-down'
        'alt-k': 'core:move-up'
        'alt-l': 'core:move-right'
    2. Save keymap.cson and reload atom.
    3. Try the new keymappings under ABC - Extended keyboard layout

    Expected: the keybindings work

    Issues we've seen: it types out the modified keys and ignores the key mapping

  • macOS: Composition characters mess up insertion point (Composition characters mess up insertion point #15344)

    Repro steps
    1. Open keymap.cson and add the following:
      'atom-text-editor':
        'alt-n': 'core:move-down'
        'alt-o': 'core:move-down'
    2. Have the following in your buffer:
      Foo
      Bar
      
    3. Have the cursor at the beginning of file(before F character) Type alt-n, then arrow right, then insert a character. Observe that the character is inserted at the beginning of the line (where the alt-n left you).
    4. Repeat steps using alt-o instead of alt-n.

    Expected: Both alt-o and alt-n behave the same

    Issues we've seen:
    bug

  • Ubuntu: Keystrokes involving ctrl resolve to the default layout instead of the active layout (Keystrokes involving ctrl on Linux resolve to the default layout instead of the active layout #13170)

    Repro steps

    This should be tested on Linux with gnome

    1. Install a Linux ditro with gnome, for example Ubuntu
    2. Install French AZERTY and English US QWERTY layouts
    3. Change the default layout to be French AZERTY
    4. Open Atom and switch to English US QWERTY layout
    5. Press ctrl-w

    Expected: core:close to dispatch (Or the keybinding-resolver to resolve to ctrl-w). Should be resolving to the keyboard layout that is chosen and not the OS default layout.

    Issues we've seen: core:undo dispatched because it was resolved as ctrl-z because AZERTY has Z where W is on QWERTY.

  • Other keyboard layouts on new Electron version

UI

  • tree-view drag image (Display the correct drag image on Electron >= 1.14 tree-view#1054)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a project in Atom with multiple files and a few folders
    2. Drag a file into a folder

    Expected:
    image

    Issues we've seen:

    image

  • drag-and-drop indicator (Fix missing drop indicator on Electron >= 1.14 tree-view#1055, Fix missing drop indicator on Electron >= 1.4 tabs#426, Fix mistakenly shown docks drop indicator on Electron >= 1.4 tabs#437)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open Atom with a few folder projects on tree-view (you can do this on terminal in a directory that has existing folder and having a space between each folder. Example: atom folderA folderB folderC)
    2. Drag and drop all of the folders to reorder them on Atom

    Expected:
    The placeholder indicates where the folder/project is being dropped to.

    screen shot 2017-03-29 at 16 31 16

    Issues we've seen:
    No placeholder shows up after drag and dropping

    screen shot 2017-03-29 at 16 30 51

  • Large file rendering (Bad rendering after ~1 million lines #16591)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a file that has over one million lines
    2. Scroll down to the bottom

    Expected: To not regress the number of lines that can be rendered. Rendering to be correct for lines past a certain point. Atom 1.25 can render around 800k to 1 million lines correctly.

    Issues we've seen: Increased number of lines rendered but bad rendering past a certain point

    bad renderer

  • Loss of subpixel AA when the cursor is at the end of long lines (Loss of subpixel AA on soft-wrapped line #16889, Don't break subpixel AA when cursor is at the end of longest line #16595)

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open text-editor.js in Atom
    2. Copy the first 21 lines to a new untitled window
    3. Turn on soft wrapping and change language mode to javascript
    4. Resize the Window so it's soft wrapped
    5. On line 15 type a until the you reach the end of the window

    Expected: To not lose subpixel AA

    Issues we've seen: Loss of subpixel AA. Both when soft wrapping was enabled and disabled.

    subpixel aa loss softwrap

  • Scrolling horizontally shift + scroll wheel (Upgrade Electron to v1.6.x #12696 (comment))

    • macOS
    • Windows 10
    • Ubuntu
    Repro steps
    1. Open a file that has long lines
    2. Turn off soft wrapping and resize the window so you have a horizontal scrollbar
    3. Press shift and scroll in both directions using the mouse wheel

    Expected: File to scroll horizontally in both directions

    Issues we've seen: File does not scroll horizontally at all in any direction

  • Scrollbars misbehaving on the first file that is opened (Upgrade Electron to v1.6.x #12696 (comment))

    Repro steps
    1. Open Atom
    2. Open some file that has content enough to have a vertical scrollbar
    3. Close Atom
    4. Open Atom and look at the vertical scrollbar

    Expected: Scrollbar to be visible

    Issues we've seen: Scrollbar is not visible and is flickering when you are editing

  • Middle clicking on unsaved tab (1.19, Linux: Middle-clicking an unsaved tab causes entire desktop to be unresponsive to clicks #15197)

    • macOS
    • Ubuntu
    Repro steps
    1. Open Atom and open a new unsaved file.
    2. Make edits to the unsaved file and middle click on the tab.

    Expected:
    Clicking save/cancel or the options on the dialog works.

    Issues we've seen:
    The UI and the dialog is unable to receive mouse clicks. You can still choose options via Keyboard, but not mouse.

  • Linux: Atom scrolls even when not focused (Atom scrolls even when not focused #15482)

    Repro steps
    1. Open Atom with a large enough file that has a scrollbar
    2. Open a different application and place it over the Atom window
    3. Scroll with the mouse inside the other window
    4. Focus the Atom window

    Expected: Atom window should keep the original scroll position

    Issues we've seen: The Atom window scrolls after it is focused
    Note: this is a regression that has not been fixed since Electron 3, will leave it in the template to keep it on our radar once it's fixed

Other

@DeeDeeG

This comment has been minimized.

Comment on lines 14 to 16
"electron-link": "^0.4.2",
"electron-mksnapshot": "^6.0.0",
"electron-packager": "^14.2.1",
"electron-chromedriver": "^9.0.0",
"electron-link": "0.4.1",
"electron-mksnapshot": "^9.0.2",
"electron-packager": "12.2.0",
Copy link
Contributor

@DeeDeeG DeeDeeG Jun 11, 2020

Choose a reason for hiding this comment

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

I'm not familiar with what these modules do, so I'm not sure if it's important. But this seems to downgrade ⬇️ electron-link and electron-packager.

(Thank you for merging my fix!! 🎉)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are most welcome 🙇‍♂️ I am actually trying to build Atom on CI and locally on Mac (Mac build passes but it's doesn't start, linux fails and windows build/test process seeing some undefined variables), so I merged master in case I missed up anything during resolving conflicts.

As for the above comment about the modules, which ones you are not familiar with electron-link and electron-packager?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I don't know electron-link or electron-packager well.

I read their release notes and I suppose any version should work.

Maybe bump electron-packager to v14 again? 🤷

Copy link
Contributor

@DeeDeeG DeeDeeG Jun 11, 2020

Choose a reason for hiding this comment

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

Also, I think certain things need to be cleared out every build. I am in the habit of doing:
rm -rf ./node_modules script/node_modules apm/node_modules before every build. This might be unnecessary, but I do think rm -rf script/node_modules can help.

If that doesn't work, script/clean usually does.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

electron-packager is used to create cross-platform executables based on an electron source code.

I haven't explored that much with electron-link but it helps create the snapshot to boost startup.

Although I don't think that either depends on the electron version, so I will try to bump them to latest.

Copy link
Contributor

@DeeDeeG DeeDeeG Jun 11, 2020

Choose a reason for hiding this comment

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

Regarding performance issues, are you able to shed more light on that?

  • Performance comparison (Atom on electron 5 vs electron 6, other apps that are running on electron 6)

    • Atom on Electron 5: Very low idle CPU usage with Electron 5.
      • Even on electron-6.1.12-merge-master branch with just electronVersion changed to 5.0.13 in package.json. So only difference is the Electron 5. Low idle CPU with Electron 5.
    • Atom on electron 6: One CPU core always at 100% if Atom is on screen. Idle CPU usage becomes low after a few moments when Atom is minimized.
    • VS Code on Electron 6: Low idle CPU usage.
      • Tested: VS Code 1.40 (first version of VS Code with Electron 6) through VS Code 1.43 (first version of VS Code with Electron 7).
  • Are you able to trace back the performance issue to a specific process?

  • Are you able to reproduce this on any other OS or setup?

    • No. Can only reproduce on my one machine where I have Linux installed. Old Atom CPU, no GPU.
    • Atom built from my branch runs well on Windows. Low idle CPU usage on Windows.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if you saw my above comment about shedding light on the performance issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DeeDeeG thanks for heads-up, I didn't notice the comment.

I guess we can move forward and put a pin on the performance issue, let's see if we can reproduce this on other machines later on (I added it to the upgrade's checklist)

Copy link
Contributor

Choose a reason for hiding this comment

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

I filed an issue you can pin if you like: #20924

Copy link
Contributor

Choose a reason for hiding this comment

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

I made a PR for electron-link which bumps acorn. atom/electron-link#26

The old electron-link fails to parse new JavaScript. This happens in #20965 too

@lkashef
Copy link
Contributor Author

lkashef commented Jun 11, 2020

@DeeDeeG I was wondering if you are able to run script/test successfully on your local machine?

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 11, 2020

script/test is somewhat flaky on my local machine. Possibly worse for me because I have a mechanical hard-drive and old CPU/RAM etc. So anything with timeouts is likely to break.

  119 passing (15s)
  1 failing

  1) AtomWindow creating a real window creates a real, properly configured BrowserWindow:
     Error: timeout of 10000ms exceeded. Ensure the done() callback is being called in this test.

Edit: Here we go:

Passing test run (click to expand):
$ script/test
No test folder found for package: atom-dark-syntax
No test folder found for package: atom-dark-ui
No test folder found for package: atom-light-syntax
No test folder found for package: atom-light-ui
No test folder found for package: base16-tomorrow-dark-theme
No test folder found for package: base16-tomorrow-light-theme
No test folder found for package: one-dark-syntax
No test folder found for package: one-light-syntax
No test folder found for package: solarized-dark-syntax
No test folder found for package: solarized-light-syntax
No test folder found for package: language-property-list
No test folder found for package: language-rust-bundled
No test folder found for package: language-source
No test folder found for package: language-typescript
Executing core main process tests

  ․ AtomApplication command-line interface behavior opens a file to a specific line number: 98ms
  ․ AtomApplication command-line interface behavior opens a file to a specific line number and column: 14ms
  ․ AtomApplication command-line interface behavior opens a directory with a non-file protocol: 12ms
  ․ AtomApplication command-line interface behavior truncates trailing whitespace and colons: 11ms
  ․ AtomApplication command-line interface behavior disregards test and benchmark windows: 34ms
  ․ AtomApplication command-line interface behavior with no open windows opens an empty window: 10ms
  ․ AtomApplication command-line interface behavior with no open windows opens a file: 11ms
  ․ AtomApplication command-line interface behavior with no open windows opens a directory: 10ms
  ․ AtomApplication command-line interface behavior with no open windows opens a file with --add: 9ms
  ․ AtomApplication command-line interface behavior with no open windows opens a directory with --add: 9ms
  ․ AtomApplication command-line interface behavior with no open windows opens a file with --new-window: 16ms
  ․ AtomApplication command-line interface behavior with no open windows opens a directory with --new-window: 8ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't res  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't restore windows when launched with no arguments: 6ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't res  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't restore windows when launched with paths to open: 5ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't res  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "no" doesn't restore windows when --new-window is provided: 4ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" restores w  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" restores windows when launched with no arguments: 6ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" doesn't re  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" doesn't restore windows when launched with paths to open: 4ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" doesn't re  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "yes" doesn't restore windows when --new-window is provided: 4ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restore  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restores windows when launched with no arguments: 7ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restore  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restores windows when launched with a project path to open: 12ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restore  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" restores windows when launched with a file path to open: 9ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" collaps  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" collapses new paths into restored windows when appropriate: 9ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" doesn't  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" doesn't restore windows when --new-window is provided: 5ms
    AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" doesn't  ․ AtomApplication command-line interface behavior with no open windows with previous window state with core.restorePreviousWindowsOnStart set to "always" doesn't restore windows on open, just launch: 10ms
  ․ AtomApplication command-line interface behavior with no open windows with unversioned application state reads "initialPaths" as project roots: 13ms
  ․ AtomApplication command-line interface behavior with no open windows with unversioned application state filters file paths from project root lists: 8ms
  ․ AtomApplication command-line interface behavior with one empty window opens a new, empty window: 4ms
  ․ AtomApplication command-line interface behavior with one empty window opens a file: 3ms
  ․ AtomApplication command-line interface behavior with one empty window opens a directory: 2ms
  ․ AtomApplication command-line interface behavior with one empty window opens a file with --add: 2ms
  ․ AtomApplication command-line interface behavior with one empty window opens a directory with --add: 2ms
  ․ AtomApplication command-line interface behavior with one empty window opens a file with --new-window: 4ms
  ․ AtomApplication command-line interface behavior with one empty window opens a directory with --new-window: 4ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a new, empty window: 4ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file within the project root: 3ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory that matches the project root: 2ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file outside the project root: 3ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory other than the project root: 5ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file within the project root with --add: 3ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory that matches the project root with --add: 3ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file outside the project root with --add: 4ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory other than the project root with --add: 4ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file within the project root with --new-window: 5ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory that matches the project root with --new-window: 4ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a file outside the project root with --new-window: 3ms
  ․ AtomApplication command-line interface behavior with one window that has a project root opens a directory other than the project root with --new-window: 4ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a new, empty window: 4ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file within the project root: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory that matches the project root: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file outside the project root: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory other than the project root: 3ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file within the project root with --add: 2ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory that matches the project root with --  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory that matches the project root with --add: 3ms
  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file outside the project root with --add: 3ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory other than the project root with --ad  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory other than the project root with --add: 3ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file within the project root with --new-window:  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file within the project root with --new-window: 4ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory that matches the project root with --  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory that matches the project root with --new-window: 3ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file outside the project root with --new-window  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a file outside the project root with --new-window: 4ms
    AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory other than the project root with --ne  ․ AtomApplication command-line interface behavior with two windows, one with a project root and one empty opens a directory other than the project root with --new-window: 4ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a new, empty window: 5ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file within the project root: 3ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory that matches the project root: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file outside the project root: 3ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory other than the project root: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file within the project root with --add: 2ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory that matches the project root with --  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory that matches the project root with --add: 2ms
  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file outside the project root with --add: 2ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory other than the project root with --ad  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory other than the project root with --add: 12ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file within the project root with --new-window:  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file within the project root with --new-window: 6ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory that matches the project root with --  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory that matches the project root with --new-window: 5ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file outside the project root with --new-window  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a file outside the project root with --new-window: 4ms
    AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory other than the project root with --ne  ․ AtomApplication command-line interface behavior with two windows, one empty and one with a project root opens a directory other than the project root with --new-window: 5ms
  ․ AtomApplication command-line interface behavior --wait kills the specified pid after a newly-opened window is closed: 14ms
  ․ AtomApplication command-line interface behavior --wait kills the specified pid after all newly-opened files in an existing window are closed: 11ms
  ․ AtomApplication command-line interface behavior --wait kills the specified pid after a newly-opened directory in an existing window is closed: 12ms
  ․ AtomApplication command-line interface behavior atom:// URLs with a package-name host loads the package's urlMain in a new window: 13ms
  ․ AtomApplication command-line interface behavior atom:// URLs with a package-name host sends a URI message to the most recently focused non-spec window: 17ms
  ․ AtomApplication command-line interface behavior atom:// URLs with a package-name host creates a new window and sends a URI message to it once it loads: 18ms
    AtomApplication command-line interface behavior atom:// URLs with a "core" host sends a URI message to the most recently focused non-spec window that owns the   ․ AtomApplication command-line interface behavior atom:// URLs with a "core" host sends a URI message to the most recently focused non-spec window that owns the open locations: 181ms
  ․ AtomApplication command-line interface behavior atom:// URLs with a "core" host creates a new window and sends a URI message to it once it loads: 72ms
  ․ AtomApplication existing application re-use creates a new application when no socket is present: 21ms
  ․ AtomApplication existing application re-use creates a new application for spec windows: 19ms
  ․ AtomApplication existing application re-use sends a request to an existing application when a socket is present: 117ms
  ․ AtomApplication IPC handling "open" opens a fixed path by the standard opening rules: 3ms
  ․ AtomApplication IPC handling "open" without any option open the prompt for selecting a path: 1ms
  ․ AtomApplication IPC handling "open-chosen-any" opens a file in the sending window: 102ms
  ․ AtomApplication IPC handling "open-chosen-any" opens a directory by the standard opening rules: 304ms
  ․ AtomApplication IPC handling "open-chosen-file" opens a file chooser and opens the chosen file in the sending window: 2ms
  ․ AtomApplication IPC handling "open-chosen-folder" opens a directory chooser and opens the chosen directory: 3ms
  ․ AtomApplication window state serialization occurs immediately when adding a window: 13ms
  ․ AtomApplication window state serialization occurs immediately when removing a window: 13ms
  ․ AtomApplication window state serialization occurs when the window is blurred: 9ms
  ․ AtomApplication when closing the last window quits the application: 8ms
  ․ AtomApplication quitting waits until all windows have saved their state before quitting: 11ms
  ․ AtomApplication quitting prevents a quit if a user cancels when prompted to save: 7ms
  ․ AtomApplication quitting closes successfully unloaded windows: 11ms
  ․ AtomWindow creating a real window creates a real, properly configured BrowserWindow: 5638ms
  ․ AtomWindow launch behavior ignores title bar style settings: 1ms
  ․ AtomWindow launch behavior opens initial locations: 1ms
  ․ AtomWindow launch behavior does not open an initial null location: 0ms
  ․ AtomWindow launch behavior does not open initial locations in spec mode: 1ms
  ․ AtomWindow launch behavior focuses the webView for specs: 0ms
  ․ AtomWindow project root tracking knows when it has no roots: 0ms
  ․ AtomWindow project root tracking is initialized from directories in the initial locationsToOpen: 1ms
  ․ AtomWindow project root tracking is updated synchronously by openLocations: 1ms
  ․ AtomWindow project root tracking is updated by setProjectRoots: 1ms
  ․ AtomWindow project root tracking never reports that it owns the empty path: 1ms
  ․ AtomWindow project root tracking discovers an exact path match: 1ms
  ․ AtomWindow project root tracking discovers the path of a file within any project root: 0ms
  ․ AtomWindow project root tracking reports that it owns nonexistent paths within a project root: 1ms
  ․ AtomWindow project root tracking never reports that it owns directories within a project root: 1ms
  ․ AtomWindow project root tracking checks a full list of paths and reports if it owns all of them: 0ms
  ․ FileRecoveryService doesn't create a recovery file when the file that's being saved doesn't exist yet: 1ms
  ․ FileRecoveryService when no crash happens during a save creates a recovery file and deletes it after saving: 44ms
    FileRecoveryService when no crash happens during a save creates only one recovery file when many windows attempt to save the same file, deleting it when the la  ․ FileRecoveryService when no crash happens during a save creates only one recovery file when many windows attempt to save the same file, deleting it when the last one finishes saving it: 34ms
  ․ FileRecoveryService when a crash happens during a save restores the created recovery file and deletes it: 146ms
    FileRecoveryService when a crash happens during a save restores the created recovery file when many windows attempt to save the same file and one of them crash  ․ FileRecoveryService when a crash happens during a save restores the created recovery file when many windows attempt to save the same file and one of them crashes: 176ms
  ․ parseCommandLine when --uri-handler is not passed parses arguments as normal: 1ms
  ․ parseCommandLine when --uri-handler is passed ignores other arguments and limits to one URL: 1ms

  120 passing (9s)

$ git_status_branch
On branch electron-6.1.12-merge-master
Your branch is up to date with 'deedeeg/electron-6.1.12-merge-master'.

@lkashef
Copy link
Contributor Author

lkashef commented Jun 11, 2020

@DeeDeeG about the time outs, from Hacking on Atom Core

You can set ATOM_DEV_RESOURCE_PATH to your repo path and from atom --help you should be able to see a --timeout flag to better adjust to your environment.


Meanwhile, I can get the core tests passing locally and on the CI, but when it executes core render process or bundled packages it times out (because the app fails unexpectedly).

You can reproduce this on windows or linux by running script/test --package atom-dark-ui or script/test --core-renderer

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 11, 2020

@lkashef Hmm yeah. I see a big Chrome devtools screen with a console error. It seems like the crash reporter itself experiences an error as well?

index.js:129 TypeError: Error processing argument at index 4, conversion failure from null
    at CrashReporterRenderer.start (/home/[user]/atom/out/atom-dev-1.50.0-dev-39d2bd480-amd64/resources/electron.asar/common/crash-reporter.js:31)
    at module.exports (/home/[user]/atom/src/crash-reporter-start.js:8)
    at setupWindow (index.js:155)
    at window.onload (index.js:106)
handleSetupError @ index.js:129

@lkashef
Copy link
Contributor Author

lkashef commented Jun 11, 2020

@DeeDeeG exactly, atom crashes and then it attempt to run the crash reporter but it crashes itself. it looks like something related to the way specs spin up atom (headless).

A wild guess (still debugging) but might be related to the snapshot.

0611/181131.760082:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffeec7e2000, 0x2000): (os/kern) invalid address (1)
[0611/181131.881068:WARNING:system_snapshot_mac.cc(42)] sysctlbyname kern.nx: No such file or directory (2)
[0611/181131.890774:WARNING:crash_report_exception_handler.cc(239)] UniversalExceptionRaise: (os/kern) failure (5)
Error! The 'core-render-process' test step finished with a non-zero exit code

Update:

I fixed the blocking issues:

Our current blockers are linux performance and electron download/packaging step, hopefully if the tests passed on Mac and Windows and on @DeeDeeG's local linux machine is a good indicator.

It seems that electron-packager (the package that downloads electron platform specific binary) is required to be v14+ and between v12 and v14, they have changed their unzipping npm module, which might explain the flakiness.


@DeeDeeG if you are able to share the dependencies of electron-packager from package-lock.json after you bootstrap/build on linux, it might be helpful to compare what I have and see if a version bump or downgrade would help us move forward, much appreciated 🙇‍♂️

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 12, 2020

@lkashef Here is what I have in script/package-lock.json on my electron-6.1.12-merge-master branch:

script/package-lock.json snippet (click to expand)
    "electron-packager": {
      "version": "14.2.1",
      "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-14.2.1.tgz",
      "integrity": "sha512-g6y3BVrAOz/iavKD+VMFbehrQcwCWuA3CZvVbmmbQuCfegGA1ytwWn0BNIDDrEdbuz31Fti7mnNHhb5L+3Wq9A==",
      "requires": {
        "@electron/get": "^1.6.0",
        "asar": "^2.0.1",
        "cross-zip": "^3.0.0",
        "debug": "^4.0.1",
        "electron-notarize": "^0.2.0",
        "electron-osx-sign": "^0.4.11",
        "fs-extra": "^8.1.0",
        "galactus": "^0.2.1",
        "get-package-info": "^1.0.0",
        "junk": "^3.1.0",
        "parse-author": "^2.0.0",
        "plist": "^3.0.0",
        "rcedit": "^2.0.0",
        "resolve": "^1.1.6",
        "sanitize-filename": "^1.6.0",
        "semver": "^6.0.0",
        "yargs-parser": "^16.0.0"
      },
      "dependencies": {
        "asar": {
          "version": "2.1.0",
          "resolved": "https://registry.npmjs.org/asar/-/asar-2.1.0.tgz",
          "integrity": "sha512-d2Ovma+bfqNpvBzY/KU8oPY67ZworixTpkjSx0PCXnQi67c2cXmssaTxpFDUM0ttopXoGx/KRxNg/GDThYbXQA==",
          "requires": {
            "@types/glob": "^7.1.1",
            "chromium-pickle-js": "^0.2.0",
            "commander": "^2.20.0",
            "cuint": "^0.2.2",
            "glob": "^7.1.3",
            "minimatch": "^3.0.4",
            "mkdirp": "^0.5.1",
            "tmp-promise": "^1.0.5"
          }
        },

@lkashef
Copy link
Contributor Author

lkashef commented Jun 13, 2020

Thanks @DeeDeeG, I apologize if I wasn't clear, I wanted to check the script/package-lock.json after running bootstrap/build from a local linux machine, since the CI is failing and local is passing, I wanted to compare in case the bug was caused by a sub-dependency down the tree, that is responsible for downloading and/or unzipping electron core.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 13, 2020

My script/package-lock.json doesn't change after running script/bootstrap or script/build.

I think if the package-lock.json (lockfile) satisfies everything in package.json then npm won't update anything. npm simply installs everything listed in package-lock.json to node_modules folder in that case.

If you mean that you need the whole file, I can do that:

https://gist.github.com/DeeDeeG/61b72dd8d6bd93f3c6c089ff9105e848

This is the same as what is committed to my branch, though. Same as committed to https://github.com/atom/atom/commits/electron-6.1.12-merge-master, as none of your fixes appear to have altered script/package.json or script/package-lock.json

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 13, 2020

If I am reading this correctly, the CI is "restoring a "node_modules cache" and not running bootstrap. Maybe its cache is outdated and incorrect. Any way to get rid of the cache, or force the CI to run bootstrap?

Could (temporarily) modify this part of the CI script:

https://github.com/atom/atom/blob/bd772b9/script/vsts/platforms/linux.yml#L33-L48

or here:

https://github.com/atom/atom/blob/bd772b9/script/vsts/platforms/linux.yml#L60

Either always bootstrap, or disable restoring cache. (Running this once should fix things, and then the change to CI scripts can be reverted.)

@lkashef
Copy link
Contributor Author

lkashef commented Jun 13, 2020

@DeeDeeG in a perfect scenario that's how package-lock.json works, but if one of the dependencies has changed it's dependency or any dependency on the tree for that matter, it could result in a different set of dependencies installed, in that case I suspecting a utility sub sub dependency of electron that downloads/zips the electron platform specific compiler.

You are right about the bootstrap/cache steps but since your branch had the correct version to begin with, I didn't think we would need to bust the cache but let me do that, in case the new binary re-download bit, has changed something I didn't foresee.

@@ -10,10 +10,10 @@
"coffeelint": "1.15.7",
"colors": "1.1.2",
"donna": "1.0.16",
"electron-chromedriver": "^9.0.0",
"electron-link": "0.4.1",
"electron-chromedriver": "^6.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

electron-chromedriver@6.0.0 won't work because of a test I modified that now requires electron-chromedriver to be >= 9.0.0. So script/bootstrap fails.

Those tests are in script/lib/check-chromedriver-version.js

Those tests are kind of silly though, because if we want electron-chromedriver and electron-mksnapshot to be >v9, we'll specify them like that in package.json. Maybe those tests should be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I resumed working based on your branch, the electron-chromedriver is v9, and the build is failing only on linux at build stage when downloading electron core.

Actually I like the checks you did, it's an adapted convention to save the next person from pulling their hair out, trying to figure out what went wrong, such failures due to dependencies mismatch, doesn't always show a useful error message, specially with your code for re-downloading binaries, I would rather keep the checks.

Copy link
Contributor

@DeeDeeG DeeDeeG Jun 16, 2020

Choose a reason for hiding this comment

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

Alright, thanks for letting me know.

I don't understand why CI failed [edit: on my branch + your added commits]. It might pass if restarted? It works for me locally.

I have to guess it's something odd with the CI environment, not a problem for actual developers on their local machines. As far as I can tell.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 16, 2020

Here's another branch to try.

I bumped electron-packager to the latest commit from their git repo. They've changed their zip dependency since their last release.

TODO: get them to make a new release so we don't have to use a git dependency in script/package.json.


@lkashef, if you get a chance, could you re-run the CI, and/or try this branch (DeeDeeG/electron-6.1.12-bump-electron-packager-from-git)?

@aminya
Copy link
Contributor

aminya commented Jun 29, 2020

I made a PR for electron-link which bumps acorn. atom/electron-link#26

The old electron-link fails to parse new JavaScript. This happens in #20965 too

@aminya
Copy link
Contributor

aminya commented Jun 29, 2020

Here's another branch to try.

I bumped electron-packager to the latest commit from their git repo. They've changed their zip dependency since their last release.

TODO: get them to make a new release so we don't have to use a git dependency in script/package.json.

@DeeDeeG They have registered a new version.

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 29, 2020

@aminya, thanks for letting me know!

Now we don't need to have a github URL dependency in script/package.json to get this updated code.

I have uploaded a branch using the new electron-packager@v15.0.0 with the new zip dependency: DeeDeeG:electron-6.1.12-bump-electron-packager. I propose to merge this into the current PR. (I guess I could open a PR targeted at this electron 6 branch if folks want me to.)


By the way, thank you to whoever ran the CI on my similar branch. It passed:

I would expect/hope results to be the same with the new branch/commit I posted in this comment.

(Nothing changed at upstream electron-packager@v15.0.0 besides their package.json and NEWS.md.)

@aminya
Copy link
Contributor

aminya commented Jun 30, 2020

Regarding electron-link, I have registered my pull request under @aminya/electron-link. I think it is better to merge that before bumping electron, since it probably fixes some of the issues that may arise. You can use it right now on this branch by merging #21003 into this branch if you want.

I have uploaded a branch using the new electron-packager@v15.0.0 with the new zip dependency: DeeDeeG:electron-6.1.12-bump-electron-packager. I propose to merge this into the current PR. (I guess I could open a PR targeted at this electron 6 branch if folks want me to.)

@DeeDeeG Could you make a pull request to master instead like how I am doing it? It is better not to make this electron-bump PR huge if it is independent. Hopefully, someone will merge it. 😁

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.

None yet

6 participants