BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

Boostnote doesn't start after Electron upgrade #3100

Open AlexMV12 opened 5 years ago

AlexMV12 commented 5 years ago

Current behavior

Boostnote hangs in loading on the start screen, some errors are present in the console. The app won't start. Screenshot_20190701_114901

Expected behavior

The app should start normally.

Steps to reproduce

  1. Update Electron to the latest version
  2. Try to start the app

Environment

As I said, this happens after upgrading electron from version

4.1.4

To version

5.0.6

I have installed Boostnote via AUR. Feel free to ask more information if needed.

Flexo013 commented 5 years ago

Does this issue also occur when using the latest version 0.11.17?

AlexMV12 commented 5 years ago

Does this issue also occur when using the latest version 0.11.17?

I couldn't find version 0.11.17: building the app from source solves the issue, but I don't know if it's what you wanted me to do.

Flexo013 commented 5 years ago

You can find the 0.11.17 installer here: https://github.com/BoostIO/boost-releases/releases/tag/v0.11.17

AlexMV12 commented 5 years ago

Sorry man, I couldn't find it in the release tags of this repo.

However, I tried and it works. With 0.11.17 the app opens as usual. As a workaround, one can use the AUR package boostnote-bin which is already update to 0.11.17.

frizop commented 5 years ago

I built locally (because there's no rpm packages) and get this same error image

I used the docker container provided:

docker build -t local/boostnote .

FROM docker.io/ubuntu:16.04                                                                                                       
MAINTAINER Kazuhisa Hara <kazuhisya@gmail.com>                                                                                    

ENV TZ="JST-9" \                                                                                                                  
    DEBIAN_FRONTEND="noninteractive"                                                                                              

RUN apt-get update && \                                                                                                           
    apt-get install -y  curl --no-install-recommends                                                                              
RUN curl -OLk https://deb.nodesource.com/setup_7.x && bash ./setup_7.x                                                            
RUN apt-get install -y \                                                                                                          
      nodejs git rpm fakeroot --no-install-recommends                                                                             
RUN npm install -g grunt-cli                                                                                                      

RUN git clone --depth 1 https://github.com/BoostIO/Boostnote/ /boostnote &&\                                                      
    useradd -m mock && chown -R mock.mock /boostnote                                                                              

USER mock                                                                                                                         
WORKDIR /boostnote                                                                                                                

RUN npm install                                                                                                                   
RUN grunt build                                                                                                                   

I also tried setup_8.x as well, to the same result.

2114L3 commented 5 years ago

multiple archlinux machines impacted by this as repos have released 5.0.6

2114L3 commented 5 years ago

ok dokey aur have acknowledged the error. and unknown to me that the AUR maintainer had been patching boostnote to support electron 4 as this project is still using version 3 as per the package.json appears atleast for archlinux, there is greater issue of boostnote not keeping up with electron

ZeroX-DG commented 5 years ago

@Rokt33r Can you help us investigate this problem?

clone1612 commented 5 years ago

AUR package maintainer reporting in. I've created a patch for Electron v5.x compatibility and have updated the package. At my end everything is working again, so could you update the package and see if any issues still remain?

2114L3 commented 5 years ago

thanks @clone1612 that's got me working again with the AUR install, love your work!

AlexMV12 commented 5 years ago

@clone1612 I can confirm that the AUR package is now working as expected. Thank you everybody for your work.

frizop commented 5 years ago

I tried building that PR and it doesn't resolve my issue. Dunno if the conclusion is the same or not though. I'll also note, there is no alt-menu available when starting boostnote under the new electron. I was unable to get to the debug window.

clone1612 commented 5 years ago

@frizop Strange, I have the alt-menu while using the latest Electron version. Have you tried opening the developer tools using ctrl+shift+i? While working on the package I also had some issues with npm and ended up using yarn instead (as the project does). Have you tried using yarn in your build script?

Another way of finding the cause of the issue could be running the project in dev mode and seeing if that works. So cloning the project, running yarn install & yarn run dev. I don't utilize a rpm based distro so sadly cannot help debugging the problem.

frizop commented 5 years ago

image Above is my attempt to compile boostnote-0.11.16.x86_64.rpm image Above is my attempt to compile boostnote-0.11.17.x86_64.rpm It appears that none of the RPMs I'm making matter. Perhaps I should retire this to a new thread?

clone1612 commented 5 years ago

That definitely would be better as this seems to be a separate issue. I've seen that error before and fixed it by replacing the npm related commands with their yarn counterparts. But best make a new issue for the sake of clarity.

Erwyn commented 5 years ago

@clone1612 could you provide guidance on this? I have the same issue, if I use yarn run-dev it works, but building with grunt always provides me with a faulty RPM and even just lauching the boostnote executable from the dist folder is failing.

So let's say something is wrong on the npm side, how would you proceed with the yarn one ?

clone1612 commented 5 years ago

@Erwyn It might be better to open a separate issue for the sake of clarity. Regarding your issue, as far as I know RPM support is not officially available (no .rpm releases are made, only .deb) and the current configuration used to generate them is most likely outdated.

In terms of how I proceed with yarn, for the AUR package we (roughly) employ the following procedure:

  1. Clone the source (i.e. this repo)
  2. Run the following commands:
    yarn install --ignore-optional
    yarn run compile
    rm -r node_modules/
    yarn install --production --ignore-optional
  3. Copy folder to /usr/lib/boostnote
  4. Save a run helper script (boostnote.js) as /usr/bin/boostnote

Afterwards you can simply run boostnote in a terminal and the app runs, assuming you've installed electron and nodejs on your system. Depending on your installed version of electron some compatibility patches may be required, as was needed for this issue. The steps might not fully apply to your setting but will hopefully help you.

Are you seeing any errors by the way when running the boostnote executable from the dist folder? You can start that executable from terminal in the hope of seeing some warnings/errors that can give an idea of where it's going wrong.

Erwyn commented 5 years ago

Hi @clone1612

thanks for the explaination, you would open a ticket about npm and not electron upgrade, is that what you mean ?

clone1612 commented 5 years ago

Hello @Erwyn

No, I meant a ticket in this repository specifying what you're exactly trying to do (compile your own .rpm package? Run the app from source? Etc.), steps you took and any errors/warnings you've encountered up until know. With that information the developers might be able to determine if it's related to Boostnote or the issue is related to an external source (e.g. npm or electron) and guide you to a solution for your problem.