Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem upgrading from 1.20 #164

Closed
yeyeto2788 opened this issue Feb 1, 2019 · 21 comments
Closed

Problem upgrading from 1.20 #164

yeyeto2788 opened this issue Feb 1, 2019 · 21 comments

Comments

@yeyeto2788
Copy link

yeyeto2788 commented Feb 1, 2019

Hello guys,

I recently upgraded the launcher from 1.20 to the 1.23 and every time I try to upgrade to 1.24 is shows an error.

Any way to bypass/fix the problem?

Regards.

@rubenscd
Copy link

rubenscd commented Feb 1, 2019

same problem

@yeyeto2788
Copy link
Author

@clockworkpi I have also noticed that the folders are duplicated, so in the launcher it also duplicates the icons on the screen.

It seems that something was left behind on the upgrade like removing old folders and files.

@sfjuocekr
Copy link

Run the updater script from an SSH shell to see what goes wrong

@cuu
Copy link
Contributor

cuu commented Feb 9, 2019

duplicated folders need to remove them manually, sorry for that
the updating progress is nothing more but a git pull ,and git can not remove/rename the folders for that

if you have update problems , go into ssh and do a git pull by hand

@yeyeto2788
Copy link
Author

@cuu but when developing the upgrade of the launcher, shouldn't this be handled? I mean the deletion of files and folders that are not needed.

What are the folders that need to be removed? I guess the ones that are older, right?

@sfjuocekr I'll try to do the upgrade by SSH tonight when I get home and see what the error is.

@rubenscd if you could do it before I do it it would be great, if it is not possible for you I'll do it when I get home.

@cuu
Copy link
Contributor

cuu commented Feb 11, 2019

@yeyeto2788
the updating is just a git pull and git reset --hard #hashtag#
so git did not remove/rename the folders, and the folders actually been renamed, like PowerOFF to be 99_PowerOFF
but git won't do the cleaning-up job ,so there are duplicated folders

@yeyeto2788
Copy link
Author

@cuu I get the point that git won't manage or handle the deletion of files and folder unless changes estate it (Someone with write access to the repo changes a file content, file directory or even deletion of this file).

Taking into account that git won't do so, shouldn't this be handle by a script post pulling repository changes fixing those duplicated files?

If this upgrade process only relies on git it will be a problem everytime there is a rename on the filesystem for the app to work properly.

I also get the point where some changes might be required to get a better user experience. New users with latest launcher version won't see these errors, but users who already have previous versions (like me or even others) are the ones that have to do processes manually.

Regards.

P.D: This is not a critique, I'm just trying to point some things that might be higly appreciated from a user experience point of view.

@yeyeto2788
Copy link
Author

Hello guys!

I have done the git pull within the ~/apps/launcher directory and it worked as expected adding and deleting files and changes into the cloned repository.

You can see the output of the command below:

screenshot_20190211-210828-01
screenshot_20190211-210842-01

Also I have done the deletion of the folders manually (sad) so if anyone is interested on doing so just connect through SSH into the GameShell and type the following commands:

  • cd ~/apps/launcher/Menu/GameShell With this we move into the directory with duplicated folders.
  • ls This will list all files on the filesystem. Take note for the folder that do not have the number on the beginning of the folder name.
  • rm -r Music\ Player This will remove the Music Player folder.
  • rm -r PowerOFF This will remove the PowerOFF folder.
  • rm -r TinyCloud This will remove the TinyCloud folder

This is the image on how I did it:

screenshot_20190211-211021-01

Note: I just had duplicated those folders and I guess we all should have only thos duplicated.

I hope it helps anyone that is having the same issue. I won't close the issue since I guess this is something it should be taken care from the upgrade point of view.

Regards.

@cuu
Copy link
Contributor

cuu commented Feb 12, 2019

if you did the git pull
maybe it's time to move launcher out of ~/apps

mv ~/apps/launcher ~/

or it will have loading issue
doesn't it?

@yeyeto2788
Copy link
Author

@cuu haven't tested it yet.

I'll take it into account for another command to execute every time there is an upgrade 😞

BTW is there any other script rather than doing a git pull? maybe a upgrade.sh or something like that?

@yeyeto2788
Copy link
Author

If I just do that I don't see anything on the screen and there is also something missing on the steps since I see that the file ~/.xinitrc does launch the load.sh file on the ~/apps/launcher directory and even changing that the screen keep showing on and off the loading screen 😞

This are the commands I executed:
image

and in the nano command change the ~/.xinitrc from:

feh --bg-center ~/apps/launcher/sys.py/gameshell/wallpaper/loading.png
exec ~/apps/launcher/load.sh &
exec ~/apps/twm.mod

to this:

feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/loading.png
exec ~/launcher/load.sh &
exec ~/apps/twm.mod

Is there something else missing?

@cuu
Copy link
Contributor

cuu commented Feb 13, 2019

@yeyeto2788
Copy link
Author

@cuu your pastebin link seems broken, can you please share the actual content of the .bashrc file?

I'll try the changes once I get home.

Regards.

@cuu
Copy link
Contributor

cuu commented Feb 13, 2019

@yeyeto2788
Copy link
Author

Hello guys, quick update:

Looking for information I found this:
image
This image is from the ~/tmp/x.log file with the following error:

Traceback (most recent call last):
  File "run.py", line 600, in <module>
    big_loop()
  File "run.py", line 509, in big_loop
    main_screen.ReadTheDirIntoPages("../Menu",0,None)
  File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 463, in ReadTheDirIntoPages
    self.ReadTheDirIntoPages(_dir+"/"+i, pglevel+1 ,self._Pages[ len(self._Pages) -1])
  File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 494, in ReadTheDirIntoPages
    iconitem._CmdPath.Init(self)
  File "../Menu/GameShell/10_Settings/__init__.py", line 20, in Init
    pages.InitListPage(main_screen)
  File "../Menu/GameShell/10_Settings/pages.py", line 13, in InitListPage
    myvars.ListPage.Init()
  File "../Menu/GameShell/10_Settings/list_page.py", line 97, in Init
    li._LinkObj.Init(self._Screen)
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 812, in Init
    OBJ.Init(main_screen)
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 802, in Init
    self.RegisterMyAgent()
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 766, in RegisterMyAgent
    obj = bus.get_object(BUS_NAME, "/org/bluez");
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

There is a weird part that might be the causing problem, in `` there are these lines:

BUS_NAME = 'org.bluez'
AGENT_INTERFACE = 'org.bluez.Agent1'
AGENT_PATH = "/gameshell/bleagent"

and the path do not exists on the GameShell itself not even with super user privileges and neither I found the file on the system:

image

I did a update & upgrade and no reference to Bluetooth anywhere (installation ogs).

After installing bluez the output was a bit different:

Traceback (most recent call last):
  File "run.py", line 600, in <module>
    big_loop()
  File "run.py", line 509, in big_loop
    main_screen.ReadTheDirIntoPages("../Menu",0,None)
  File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 463, in ReadTheDirIntoPages
    self.ReadTheDirIntoPages(_dir+"/"+i, pglevel+1 ,self._Pages[ len(self._Pages) -1])
  File "/home/cpi/launcher/sys.py/UI/main_screen.py", line 494, in ReadTheDirIntoPages
    iconitem._CmdPath.Init(self)
  File "../Menu/GameShell/10_Settings/__init__.py", line 20, in Init
    pages.InitListPage(main_screen)
  File "../Menu/GameShell/10_Settings/pages.py", line 13, in InitListPage
    myvars.ListPage.Init()
  File "../Menu/GameShell/10_Settings/list_page.py", line 97, in Init
    li._LinkObj.Init(self._Screen)
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 812, in Init
    OBJ.Init(main_screen)
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 802, in Init
    self.RegisterMyAgent()
  File "/home/cpi/launcher/Menu/GameShell/10_Settings/Bluetooth/__init__.py", line 766, in RegisterMyAgent
    obj = bus.get_object(BUS_NAME, "/org/bluez");
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

STILL NOT ABLE TO USE MY GAMESHELL 😢

@yeyeto2788
Copy link
Author

I closed it by mistake, sorry for that.

@yeyeto2788 yeyeto2788 reopened this Feb 20, 2019
@yeyeto2788
Copy link
Author

yeyeto2788 commented Feb 20, 2019

I got it to kind of make it work

I the method RegisterMyAgent on Menu/GameShell/10_Settings/Bluetooth/__init__.py

    def RegisterMyAgent(self):
        global AGENT_PATH, bus,devices,adapter
        
        capability = "KeyboardDisplay"
        self._MyAgent = BleAgent(bus, AGENT_PATH)
        self._MyAgent._Leader = self
        try:
            obj = bus.get_object(BUS_NAME, "/org/bluez");
            manager = dbus.Interface(obj, "org.bluez.AgentManager1")
            manager.RegisterAgent(AGENT_PATH, capability)
        except dbus.exceptions.DBusException:
            pass
        print("BleAgent %s registered" % AGENT_PATH)

Of course, this is not an elegant way to avoid problems since bluetooth screen is empty and takes more time to load the main screen menu but seems to be a possible solution to the problem 😄

It would be also great to point in the logs that this problem was raised and maybe a pop-up showing the error.

I guess that the quickest solution would be to flash the sd card again with new version 😢

@cuu
Copy link
Contributor

cuu commented Feb 21, 2019

it's because your os image does not include the bluetooth support
try to upgrade os image to v0.21 and it will be fixed

@yeyeto2788
Copy link
Author

@cuu is there a way to include without having to reflash the sd card?

@cuu
Copy link
Contributor

cuu commented Feb 21, 2019

https://github.com/clockworkpi/bluetooth/wiki here is how
and here is the kernels and dtbs

https://github.com/clockworkpi/Kernel/tree/master/v0.2

good luck

@yeyeto2788
Copy link
Author

Hey guys!

Closing this issue.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants