Farmbot-Web-App icon indicating copy to clipboard operation
Farmbot-Web-App copied to clipboard

Cannot update Web-App anymore

Open derletztename opened this issue 7 years ago • 31 comments

Expected Behavior

after

rails api:update

the Web-App should update

Actual Behavior

update_notworking

derletztename avatar Jan 24 '19 12:01 derletztename

@derletztename Can you try this in the meantime while I work on a fix?

git pull https://github.com/FarmBot/Farmbot-Web-App.git master
sudo docker-compose run web bundle install
sudo docker-compose run webpack npm install
sudo docker-compose run web rails db:migrate

RickCarlino avatar Jan 24 '19 13:01 RickCarlino

I have no idea what exactly happend there, but it seems to be updated now and everything is just working fine :)

derletztename avatar Jan 24 '19 14:01 derletztename

Actually it does seem I have not the newest version on the server. When I compare to https://forum.farmbot.org/t/december-19-2018-software-update/4352 it still looks like the old version. If I look into version (top right corner) it says none. How can I check if I have the new version?

Instead of the picture like here: https://user-images.githubusercontent.com/5524043/50247182-0d013b00-038c-11e9-8014-427fbf8ff993.png there is tiny symbol only farmbot

And I cannot box-select multiple plants.

I added the start up sequence. Maybe that helps

Farmbot_Log_24012019.docx

derletztename avatar Jan 24 '19 14:01 derletztename

@derletztename It sounds like your browser might be caching things. Can you:

  1. Log out of the application
  2. Log back in
  3. Perform a "hard refresh" (ctrl + shift + r on most systems).
  4. (unrelated step) copy/paste the results of git log -1 into this issue thread.

RickCarlino avatar Jan 24 '19 15:01 RickCarlino

I don't have the feeling the update worked. Even after logging out the old screen appears: farmbot

derletztename avatar Jan 24 '19 18:01 derletztename

git log -1

paul@permabotserver:~$ cd Farmbot-Web-App paul@permabotserver:~/Farmbot-Web-App$ git log -1 commit dce91cdcc336c0502edab330090c8eaae7d8bd85 (HEAD -> master) Merge: 436a3a2 2633d17 Author: Rick Carlino [email protected] Date: Mon Jan 7 14:49:17 2019 -0600

Merge pull request #1078 from FarmBot/staging

v7.1.1 - Happy Hibiscus

paul@permabotserver:~/Farmbot-Web-App$

derletztename avatar Jan 24 '19 18:01 derletztename

@derletztename I am suspicious you have a server process running in the background. Can you try this?:

sudo docker-compose down

Then

sudo docker-compose up

RickCarlino avatar Jan 24 '19 19:01 RickCarlino

Ok this is wierd. It looks like there were about 13 web apps running? img_20190124_212105 When I want to shutdown the server, do I kill it with ctrl+c and that's it? Or do I have to type docker-compose down afterwards as well?

derletztename avatar Jan 24 '19 20:01 derletztename

But after killing all those web app versions and starting a new one, it still was the old log in screen. So I have to close it again and update again? tried it git pull says my version is already up to date.

derletztename avatar Jan 24 '19 20:01 derletztename

@derletztename Can you run sudo docker-compose down and then try accessing the web app from a browser? I think there still might be a process running somewhere, possibly a very old version of the app.

Is the page still accessible after running sudo docker-compose down?

RickCarlino avatar Jan 24 '19 22:01 RickCarlino

So, after the web app is being started, I can connect to it via the browser, when I kill it with ctrl+c, I cannot connect anymore. Then I can still use sudo coker-compose down to end it somehow again. Still can't access. But I can't use sudo docker-compose down again. Then it says Network farmbot-web-app_default not found. Therefore I guess, no more versions of the web app are running in the backround. Also atm I completely shut down the PC which is running the server in between while we are talking. Does this make anything clearer?

derletztename avatar Jan 25 '19 08:01 derletztename

@derletztename What is your RAILS_ENV set to? If it's production, you might need to re-build the web app assets.

Try:

sudo docker-compose run webpack npm run build

RickCarlino avatar Jan 25 '19 15:01 RickCarlino

yeah, it's production. So I tried what you suggested and got an error

img_20190125_202957 1280x606

derletztename avatar Jan 25 '19 19:01 derletztename

Whoops- that's an easy fix. I forgot that the npm run build task actually runs in the web container rather than the webpack container (it calls bundler which does not exist in the webpack container).

Please try:

sudo docker-compose run web npm run build

instead.

RickCarlino avatar Jan 25 '19 21:01 RickCarlino

You mean

sudo docker-compose run web npm run build

?

derletztename avatar Jan 26 '19 09:01 derletztename

Correct. I've updated the original message. Please let me know if that fixed the issue.

RickCarlino avatar Jan 26 '19 16:01 RickCarlino

Started good, but then failed badly :(

img_20190126_195734 976x1280

derletztename avatar Jan 26 '19 19:01 derletztename

I suspect there's an old version of node-sass in your node_modules directory.

Try:

sudo docker-compose run web npm rebuild node-sass
sudo docker-compose run web npm install
sudo docker-compose run web npm run build

RickCarlino avatar Jan 26 '19 19:01 RickCarlino

More Errors :( Errors.txt

derletztename avatar Jan 26 '19 19:01 derletztename

@derletztename It looks like this is a configuration or dependency issue with Webpack on our side. I will investigate the matter on Monday.

RickCarlino avatar Jan 26 '19 22:01 RickCarlino