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

Flatpak Plugins #578

Closed
rgleason opened this issue Jan 12, 2022 · 30 comments
Closed

Flatpak Plugins #578

rgleason opened this issue Jan 12, 2022 · 30 comments

Comments

@rgleason
Copy link
Contributor

rgleason commented Jan 12, 2022

@filochard

We have been checking and testing MacOS Plugins and Raspbian Plugins which have resulted in a number of fixes for those OS. Since you've been using Flatpak, would you mind advising regarding what plugins are available and which ones really work?

For a reference of what plugins are generally available, please see the MacOS thread on Cruiser's Forum, hopefully these are also available in flatpak.

There are some later additions here and here

If we could generate a similar list of plugins, and confirm if they work, and if not what is the issue, that would be very helpful.

@filochard
Copy link

Hi Rick
here is the list of the plugins appearing in the plugin manager : (opencpn 5.6.0 flatpak 20.08)
flatpack-ocpn-plugins.txt

I installed all of them

  • logbook (I installed the last version 1.4.26 that has been built in cloudsmith !!) it works perfectly now

three kinds of problems appear

  1. there's a grey warning button in the list for some plugins : no more managed by opencpn !!!
  • oernc (I had installed it before updating opencpn to 5.6.0 )
  • shipdriverplayer
  • DR
  1. wrong icons : Tactics Dashboard (a puzzle in the icons tray)

  2. no access to preferences (greyed button) in /tools/plugins list

  • AIS radar view
  • Celestial navigation
  • Climatology
  • DR
  • pypilot
  • S63
  • ShipDriver
  • UKtides
  • Testplugin
  • VDR
  • WeatherRouting

Besides this opencpn inside Flatpak is not very funny :

  1. I get repeated warnings in the console
    (opencpn:2): Gtk-CRITICAL **: 13:03:44.136: gtk_widget_set_allocation: assertion '_gtk_widget_get_visible (widget) || _gtk_widget_is_toplevel (widget)' failed

  2. sometimes opencpn crashes without explaination

  3. opencpn freezes when moving the chart
    screen_20220113-131336

Worse :
To update flatpak I had to download 500 Mbytes and then 250Mbytes to update the nvidia stuff when I updated my driver
I lost my oesenc key
I have no access to Firefox and so no access to the links inside opencpn
I have to add the path to my own charts when launching opencpn

Since the choice was done not to allow simple building for the plugins (managed by the plugin manager) I can't anymore create rpms for my distribution (the plugin manager only works for Windows, MacOS, Debian )
There won't be now any possibility to update the Mageia's rpms that I have been maintaining
For the simple users all the configurations will be lost when they switch to flatpak (it's not so user friendly to find them and copy them in the right place for a simple user)

I have created an OpenCPN 5.6.0 rpm and could use most of the rpms for the plugins I had built for OpenCPN 5.2.4
But it informs that it needs a more recent version of oesenc for which an rpm can't be built anymore...

I understand why flatpak was choosen but it's a pity we can't anymore build simply some plugins such as radar oernc oesenc to include them in a rpm as we could before !

@rgleason
Copy link
Contributor Author

Thank you filochard! I hope you have another installation that is working! I have posted an issue about this so that others can respond. I am very sorry about the problems and repeated warnings which look like to they are from wxWidgets.

@filochard
Copy link

filochard commented Jan 13, 2022

Fortunately my legacy install of OpenCPN 5.2.4 (with the rpms I maintain) is still working on Mageia8
for oesenc I forked your version 4.2.15 and modified a little the source of oesenc to include version 1.20 of oeserverd from bdbcat (OK for OpenCPN 5.2.4)
https://github.com/filochard/oesenc_pi

But I never was able to modify this source to build a rpm complying with OpenCPN 5.6.0 that doesn't accept the previous version of oesenc...

@rgleason
Copy link
Contributor Author

filochard
I wonder if it is possible to post a copy of your log file? So that bdbcat or someone else knowledgeable can review it?

Also this is just an idea, but perhaps uninstalling all plugins except the internal plugins and seeing if you still get the graphics freezing issue?

Is opengl on? or off?

Tactics and DashboardTactics need to be fixed, we have those issues recorded.

Thanks for your help.

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

@filochard : Something fishy is going on here. Trying to take your points one by one:

  • The repeated console warnings are basically a wxWidgets issue. They are present to some extent in most gtk ports, we normally just not care much about them (waiting for a new wxWidgets release...)
  • Yes, the Nvidia driver updates are a pain, agreed. There is no free lunch...
  • I can reproduce the problems with missing inactive preferences button in for example AIS radar view and Celestial Navigation. This is most likely plugin bugs, other plugins like oesenc and radar does not exhibit this bug. Thus, we need to file bugs against the plugins for this.
  • The most irritating and actually dangerous thing is your crashes. This is nothing I recognize, and I have been using the flatpak'ed opencpn for two sailing seasons. My first bet it's about a broken plugin. Can you possibly test in safe mode (no plugins etc using -safe_mode) and see if you can reproduce the crash?
  • BTW: what does flatpak --version say at Mageia?

EDIT: OTOH, Shipdriver works fine by me.

Filed Rasbats/UKTides_pi#12
Filed: jongough/testplugin_pi#241

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

More on the list:

I lost my oesenc key

Yes, this is an unfortunate fact. The Flatpak sandbox is a separate machine from a licensing point of view. The solution is to get the USB dongle to next sailing season.

I have no access to Firefox and so no access to the links inside opencpn

Not completely true. When you for example push the "Website" button for a plugin it will launch Firefox. But there are certainly places which needs to be fixed, for this to work the links must be used correctly in the plugins. Ergo: we need specific bugs for plugins where it happens.

I have to add the path to my own charts when launching opencpn

Every time? Seems strange, does not happen to me?!

@filochard
Copy link

filochard I wonder if it is possible to post a copy of your log file? So that bdbcat or someone else knowledgeable can review it?

Here it is :
opencpn.log.txt

Also this is just an idea, but perhaps uninstalling all plugins except the internal plugins and seeing if you still get the graphics freezing issue?

I unactivated all the plugins : no more freeze
I will try to activate the plugins one by one but this will take some time ...

Is opengl on? or off?

It's on (you may see this in the log file

Tactics and DashboardTactics need to be fixed, we have those issues recorded.

Thanks for your help.

Thanks for your work !!!

@Rasbats
Copy link
Contributor

Rasbats commented Jan 14, 2022

Testing on Flatpak:
ShipDriver works fine for me.
UKTides does not use preferences. My mistake - I did not remove WANTS_PREFERENCES from the code. Works fine.

@filochard
Copy link

filochard commented Jan 14, 2022

@filochard : Something fishy is going on here. Trying to take your points one by one:

* The repeated console warnings are basically a wxWidgets issue. They are present to some extent in most gtk ports, we >normally just not care much about them (waiting for a new wxWidgets release...)

I know those are simple warnings : in Mageia 8 we get the same warnings for some programs rebuilt for wxgtk 3.1.5 final release

* Yes, the Nvidia driver updates are a pain, agreed. There is no free lunch...

Today I have to update once again all the stuff : !!!
Freedesktop Platform : 20.08-> 20.08.17 (20.08) = 256.2 Mo
Mesa : 20.08-> 21.1.8 (20.08) = 101.5 Mo
org.freedesktop.Platform.GL.nvidia-470-74 (-> 1.4) = 260.4 Mo
that's the second time in one month !
More than 1 Go to simply update what flatpak needs to use OpenCPN
It begins to be heavy : it's no more a sand box but a sand beach ;-)

* I can reproduce the problems with missing inactive preferences button in for example AIS radar view and Celestial  >Navigation. This is most likely plugin bugs, other plugins like oesenc and radar  does not exhibit this bug. Thus, we need to file >bugs against the plugins for this.

* The most irritating and actually dangerous thing is your crashes. This is nothing I recognize, and I have been using the >flatpak'ed opencpn for two sailing seasons. My first bet it's about a broken plugin. Can you possibly test in safe mode (no >plugins etc using `-safe_mode`) and see if you can reproduce the crash?

Previously I had no crash nor freeze inside flatpak with OpenCPN 5.2.4
NB when building rpms for Mageia I discovered that some plugins (such as logbook) needed absolutely to be built upon wxgtk 3.0 : if opencpn and the plugins were built upon wxgtk 3.1.5 I got crashes
I have had to strictly indicate BuildRequire : wxgtk =3.0 <3.1 in each rpm spec file so that we don't get crash anymore

Maybe some plugins were written for wxgtk 3.0 and that's the reason there are crashes with wxgtk 3.1.5

* BTW: what does `flatpak --version` say at Mageia?

version 1.10.5

EDIT: OTOH, Shipdriver works fine by me.

Filed Rasbats/UKTides_pi#12 Filed: jongough/testplugin_pi#241

@filochard
Copy link

filochard commented Jan 14, 2022

I have to add the path to my own charts when launching opencpn

Every time? Seems strange, does not happen to me?!

I have to add this path inside the script :
flatpak run --filesystem=/mnt/Seagate/CD_ISOS/cartes-marines/ org.opencpn.OpenCPN

It's not very user friendly for a simple user that previously could simply access to the whole filesystem from OpenCPN

I'm thinking about Mageia' users when there will not exist rpms anymore but only flatpak to use OpenCPN...
(the recent code sources make me unable to build rpms : they can only create plugins to download for the plugin Manager inside MacOS Windows Debian or Flatpak... when one year ago we could simply cmake, make build , and install for any OS)
Mageia users are gonna loose all what they had configured
Unless I could find a way to create tar.gz to import manually with the plugin manager (adding building for Mageia inside Cloudsmith seems out of reach for me)

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

have to add this path inside the script :
flatpak run --filesystem=/mnt/Seagate/CD_ISOS/cartes-marines/ org.opencpn.OpenCPN

It's not very user friendly for a simple user that previously could simply access to the whole filesystem from OpenCPN

Indeed, this is messy. However, most users have the charts under $HOME, and in this case it works out of the box. I intend to work further with this for the case you describe here which could be much smoother, for sure.

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

I'm thinking about Mageia' users when there will not exist rpms anymore but only flatpak to use OpenCPN...

I'm on Fedora myself. What I do think is that we who are using the more "odd" linux distributions will benefit in the long run by using the same solution. But I know the feeling, Flatpak is strange, new and hard to grasp in the beginning. And the handling of the Nvidia drivers is a pain.

OTOH, from a user perspective I think you can agree that discovering and installing new plugins is way easier in the new version, right?

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

Maybe some plugins were written for wxgtk 3.0 and that's the reason there are crashes with wxgtk 3.1.5

Basically no plugins have been tested against wx 3.1. See OpenCPN/OpenCPN#2506

@filochard
Copy link

I'm thinking about Mageia' users when there will not exist rpms anymore but only flatpak to use OpenCPN...

I'm on Fedora myself. What I do think is that we who are using the more "odd" linux distributions will benefit in the long run by using the same solution. But I know the feeling, Flatpak is strange, new and hard to grasp in the beginning. And the handling of the Nvidia drivers is a pain.

Why "odd" distributions ? Mageia, close to Fedora or OpenSuse, is very easy to configure for a beginner, much more simple than Debian and even than Ubuntu

OTOH, from a user perspective I think you can agree that discovering and installing new plugins is way easier in the new version, right?

You are right, the plugin manager is really simple to use...
But the plugins rpms for Mageia are simple to install (suggested when installing the OpenCPN main rpm) automatically updated and optionally activated.
With a legacy install, (or with MacOS Windows or Ubuntu) the user has free access to the file system, (when for example the charts are on an external drive) and to the other programs from OpenCPN (LibreOffice, Firefox...) that' s not the case with flatpak

@filochard
Copy link

Maybe some plugins were written for wxgtk 3.0 and that's the reason there are crashes with wxgtk 3.1.5

Basically no plugins have been tested against wx 3.1. See OpenCPN/OpenCPN#2506

I got a problem when trying to use wx 3.1 to build the whole stuff beside OpenCPN 5.2.4 !
that induced crashes
I had to explicitely require wx 3.0 (fortunately the two versions of the library may cohabit inside the OS)

With other programs (such as guayadeque for instance) switching from wxgtk3.0 to wxgtk 3.1 needed to modifiy the source
(you'll perhaps find some ideas about what to change inside the source of the plugins)
https://github.com/anonbeat/guayadeque
anonbeat/guayadeque#110
anonbeat/guayadeque@24353c0
anonbeat/guayadeque#138

@leamas
Copy link
Contributor

leamas commented Jan 14, 2022

Why "odd" distributions ? Mageia, close to Fedora or OpenSuse, is very easy to configure for a beginner, much more simple than Debian and even than Ubuntu

Just in terms of number of users and devs

@filochard
Copy link

Maybe some plugins were written for wxgtk 3.0 and that's the reason there are crashes with wxgtk 3.1.5

Basically no plugins have been tested against wx 3.1. See OpenCPN/OpenCPN#2506

Hi
Maybe this will be useful for you :

Trying to build some Mageia rpms (other than OpenCPN) upon wxgtk 3.1.5, one the dev found a regression in this version from april 2021, preventing to resize some windows for some programs !

This issue (wxWidgets/wxWidgets#19170) has been corrected in july 2021 by two commits that may be patched to the wxgtk 3.1.5 final release :
wxWidgets/wxWidgets@136574b
wxWidgets/wxWidgets@912f4b7

I don't know if OpenCPN or its plugins are concerned ...

@leamas
Copy link
Contributor

leamas commented Jan 20, 2022

@filochard: good input. Thanks!

I have added these two patches the 3.5.1 packages at https://launchpad.net/~leamas-alec/+archive/ubuntu/wxwidgets. This the part of the underpinnings for OpenCPN/OpenCPN#2506.

As I write, I realize that I need to add the same patches to the flatpak build in the PR. Will do.

@rgleason
Copy link
Contributor Author

Looking in Filochard's log above I find many plugin attempted installations like this.
What is going on?

12:53:10.311 MESSAGE PluginHandler.cpp:319  
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: ubuntu-gtk3-x86_64, abi_version: 20.04, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: android-arm64, abi_version: 16, major ver: 16
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: ubuntu-x86_64, abi_version: 18.04, major ver: 18
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: flatpak-aarch64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: ubuntu-gtk3-x86_64, abi_version: 18.04, major ver: 18
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.311 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.311 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: debian-x86_64, abi_version: 10, major ver: 10
12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.312 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.312 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: darwin-wx315, abi_version: 10.13.6, major ver: 10
12:53:10.312 MESSAGE PluginHandler.cpp:318 Returning fail for flatpak-x86_64
12:53:10.312 MESSAGE PluginHandler.cpp:319  
12:53:10.312 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.312 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.312 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: android-armhf, abi_version: 16, major ver: 16
12:53:10.312 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.312 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.312 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: flatpak-x86_64, abi_version: 18.08, major ver: 18
12:53:10.312 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.312 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.312 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: ubuntu-x86_64, abi_version: 16.04, major ver: 16
12:53:10.312 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20

@rgleason
Copy link
Contributor Author

After update to OpenCPN linux and flatpak builds to wxWidgets 3.1.5 above, are the PI preferences buttons working?

@leamas
Copy link
Contributor

leamas commented Jan 21, 2022

Looking in Filochard's log above I find many plugin attempted installations like this.

No, you don't. Please read the code.

@rgleason
Copy link
Contributor Author

rgleason commented Jan 21, 2022

From 12:53:10.310 to 12:59:19.491 a period of 6 minutes where there are many failures.

Then starting again 12:59:23.374 M etc.

@bdbcat
Copy link
Member

bdbcat commented Jan 21, 2022

All that noise in the logfile comes from an accidental commit of mine for some debugging, that I forgot to revert before Release to Production. Oooops, sorry. It is useful, if busy...
For example, taking three lines, for examination:

12:53:10.311 MESSAGE PluginHandler.cpp:182 Host: init: abi: flatpak-x86_64, abi_version: 20.08, major ver: 20
12:53:10.312 MESSAGE PluginHandler.cpp:159 Plugin: setting up, name: Calculator
12:53:10.312 MESSAGE PluginHandler.cpp:160 Plugin: init: abi: darwin-wx315, abi_version: 10.13.6, major ver: 10

He is testing a plugin for applicability to the current host. When the parameters in the line "Host: init: :abi:" match the parameters in the line "Plugin: init: abi:", a potential compatible plugin is detected. Most of the cases are fails, since he is scanning the entire catalog.

Dave

@leamas
Copy link
Contributor

leamas commented Jan 21, 2022

@bdbcat : Please don't remove those statements, but make them "debug" instead. They are crucial when hunting bugs in the matching.

@rgleason
Copy link
Contributor Author

Thanks, bdbcat. So it is not coming from the PIM, directly, but from him executing "Import Plugin?"

@bdbcat
Copy link
Member

bdbcat commented Jan 21, 2022

@leamas: Yes, that was the commit error. They will stay as "debug".
@rick: Coming from PIM. You will see this many times when working with the Plugins page.

@rgleason
Copy link
Contributor Author

rgleason commented Jan 21, 2022

A bit off topic, but is this when using "Plugin tarballs downloader" at the bottom of this download page?

I think this is a great resource, but I wonder why Norton is telling me unequivocally that these links are a "Dangerous Webpage"? Perhaps these links don't have a good certificate?

https://safeweb.norton.com/report/show?url=http://gafsan.crabdance.com/opencpn-dl/&ulang=en

@rick
Copy link

rick commented Jan 22, 2022

giphy (10)

rick/you-rang#1

@rgleason
Copy link
Contributor Author

This post above has been reported.

@rgleason
Copy link
Contributor Author

Closing

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

6 participants