Menu

#1177 Java exceptions while trying to install plugins on Flatpak version

v_7.x
open
nobody
flatpak (1)
6
2023-02-16
2023-02-08
Pablo AB
No

I commented on this plugin but I'm almost sure is an issue with flatpak package (probably to the permissions):

It seems doesn't 't work on SH3D Flatpak edition (now on v7.0.2, tried on Pop! OS 22.04). I downloaded PluginManager-1.0.sh3p, Pan3dView.sh3p and Wirings-1.0.sh3p and trying to install them with something likeflatpak run com.sweethome3d.Sweethome3d PluginManager-1.0.sh3p. I get some errors related to (full example attached):

java.lang.NullPointerException
...
java.net.UnknownHostException: daniels118.altervista.org
...

The Plugins Manager... and Draw wirings are shown on Tools menu, but the first one return "Error: daniels118.altervista.org" and the second "To be able to add/edit wirkings you need to install Pan3DView plugin 1.7 or later!".

Maybe because the flatpak sandboxed SH3D? In that case Flatseal could help.

1 Attachments

Discussion

  • Pablo AB

    Pablo AB - 2023-02-10

    It partially works: On the first run, I was asked about the update periodicity of one of those plugins, though.

    Copying *.sh3p to ~/.eteks/sweethome3d/plugins result on the same behavior.

     
  • Pablo AB

    Pablo AB - 2023-02-10

    Solution: Should be documented that on Flatpak bundle, in order to work, network permission (share=network) should be granted.

     
  • Emmanuel Puybaret

    Thanks for your feedback.
    The log lets appear a java.net.UnknownHostException exception which could happen if the seeked host is unreachable, for example if the access to Intenet is not granted.

     
    • Daniele

      Daniele - 2023-02-11

      Thank you both Pablo and Emmanuel for reporting this issue and providing these tips. From my side I can make these observations:
      - a message to the user is issued (and will be improved) only when opening the plugin manager, not when checking for updates automatically in background. It could be quite common for some users to not have an internet connection always active, and having a warning popup message every time they start SH3D could be annoying.
      - never install an old version of a plugin when there is a newer one available, unless there is a specific reason. For some reason I cannot remove the attachment from the first post on SourceForge, maybe Emmanuel could.

      I'm going to publish an updated version of the plugin with a better message for the user when there is no internet connection.

       
  • Pablo AB

    Pablo AB - 2023-02-15

    @puybaret I sadly recently noticed you are not related to the flatpak bundle, the nowadays most popular way to distribute apps on Linux. I'll file an issue there. For anyone with this issue, GUI way would be to enable network access on Flatseal. On CLI: flatpak override --user --share=network com.sweethome3d.Sweethome3d.

    @daniels118 If network access is not granted, the error doesn't show up every time SH3D start; only when running the plugin under Tools menu. The UnknownHostException are visible only when running flatpak run com.sweethome3d.Sweethome3d PluginManager-1.0.sh3p.

     
    • Daniele

      Daniele - 2023-02-16

      Hi Pablo, yes, I understand the two cases and I think the current behaviour is fine. But the Version 1.0 is obsolete. Just throw away the file you have and download the latest version from here https://sourceforge.net/p/sweethome3d/plug-ins/44/?page=1#c0f6/511b

       
      • Pablo AB

        Pablo AB - 2023-02-16

        I'm already using v1.5.2. As soon as I granted network access to the flatpak (my Solution message above), Plugin manager update itself and all the others :-) BTW, thank you for your time and beautiful work.

         
  • Bastien Nocera

    Bastien Nocera - 2023-02-16

    Hey Daniele,
    What would be great is if the plugin could parse the /.flatpak-info if it exists (it's in .ini format), and check for network being available in the shared key of the Context section:

    [Context]
    shared=network;ipc;
    

    This would allow the plugin to say that network access is disabled, instead of the network not working. I don't plan on adding network access to the SweetHome3D as the programme itself doesn't use the network.

     
    👍
    1
  • Pablo AB

    Pablo AB - 2023-02-16

    @puybaret stock SweetHome3D don't need (and won't in the near future) network access?

    SH3D flatpak maintainer is not very interested in granting network access just for SH3D plugins.

     
  • Emmanuel Puybaret

    Sweet Home 3D uses Internet access to check new versions when Check updates at program launch option is selected in the preferences. If Internet access is not granted, this check will be simply ignored.
    I prefer not requiring Internet access for the desktop version for privacy reasons and because some people may not have access to Internet (or the right to access to it in their orgnization).

     

    Last edit: Emmanuel Puybaret 2023-02-16

Log in to post a comment.