YunoHost-Apps / hotspot_ynh

Wifi Hotspot app for YunoHost
GNU Affero General Public License v3.0
39 stars 19 forks source link

Install fails on RPi because of missing GPG key for debian repo #79

Closed imacfan closed 11 months ago

imacfan commented 2 years ago

Steps to reproduce

  1. Go to install app page
  2. Install hotspot

Expected behavior

hotspot installed

Logs

2021-08-13 13:58:11,205: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update 2021-08-13 13:58:11,624: DEBUG - Get:1 http://deb.debian.org/debian buster InRelease [122 kB] 2021-08-13 13:58:12,008: DEBUG - Hit:2 http://archive.raspberrypi.org/debian buster InRelease 2021-08-13 13:58:12,110: DEBUG - Err:1 http://deb.debian.org/debian buster InRelease 2021-08-13 13:58:12,111: DEBUG - The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 2021-08-13 13:58:12,146: DEBUG - Hit:3 http://raspbian.raspberrypi.org/raspbian buster InRelease 2021-08-13 13:58:12,945: DEBUG - Hit:4 http://forge.yunohost.org/debian buster InRelease 2021-08-13 13:58:16,465: DEBUG - Reading package lists... 2021-08-13 13:58:16,512: WARNING - W: GPG error: http://deb.debian.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 2021-08-13 13:58:16,513: WARNING - E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed. 2021-08-13 13:58:16,516: DEBUG - + ynh_exit_properly 2021-08-13 13:58:16,517: DEBUG - + local exit_code=100 2021-08-13 13:58:16,517: DEBUG - + rm -rf /var/cache/yunohost/download/ 2021-08-13 13:58:16,520: DEBUG - + '[' 100 -eq 0 ']' 2021-08-13 13:58:16,520: DEBUG - + trap '' EXIT 2021-08-13 13:58:16,520: DEBUG - + set +o errexit 2021-08-13 13:58:16,521: DEBUG - + set +o nounset 2021-08-13 13:58:16,521: DEBUG - + sleep 0.5 2021-08-13 13:58:17,025: DEBUG - + type -t ynh_clean_setup 2021-08-13 13:58:17,025: DEBUG - + ynh_clean_setup 2021-08-13 13:58:17,026: DEBUG - + ynh_clean_check_starting 2021-08-13 13:58:17,026: DEBUG - + '[' -n '' ']' 2021-08-13 13:58:17,027: DEBUG - + '[' -n '' ']' 2021-08-13 13:58:17,027: DEBUG - + exit 1 2021-08-13 13:58:18,032: ERROR - Unable to install hotspot: An error occurred inside the app installation script

mikerjensen commented 2 years ago

I have the same error.

alexAubin commented 2 years ago

I'm guessing this is related to being on a RPi, and the app willing to enable the non-free repositories to install wifi drivers ... Can't be 100% sure without the full log ..

mikerjensen commented 2 years ago

Thanks Alex, the full log is here: https://paste.yunohost.org/raw/isovijiboq I tried it a second time except choosing 'No' for 'install non-free firmware', and got the same result. From the console I also tried: apt install firmware-ipw2x00 and agreed to install non-free, but didn't seem to help.

alexAubin commented 2 years ago

Can you try to run apt update ? I'm suspecting that even if the app got removed, it didnt clean the old debian non-free line

mikerjensen commented 2 years ago

Ah yes, apt update gives me: apt update Hit:1 http://archive.raspberrypi.org/debian buster InRelease Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Get:3 http://deb.debian.org/debian buster InRelease [122 kB] Hit:4 http://forge.yunohost.org/debian buster InRelease
Err:3 http://deb.debian.org/debian buster InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517 Reading package lists... Done W: GPG error: http://deb.debian.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9EFBF77E11517 E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default.

mikerjensen commented 2 years ago

So at the command line i did: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517 and repeated for the other ones listed above, and then re-reran the yunohost wifi hotspot install and got some other types of errors: https://paste.yunohost.org/raw/iqefaxovuk

alexAubin commented 2 years ago

Just commited https://github.com/labriqueinternet/hotspot_ynh/pull/82 which should fix that issue ... but it's gonna take a couple hours to propagate to the app catalog

In the meantime you can run yunohost app install https://github.com/labriqueinternet/hotspot_ynh to test the install with the new version

mikerjensen commented 2 years ago

Ah great, thanks. As suggested I tried the command line install with your new version as per your reply above and got some more errors. They seemed to be related to " ImportError: No module named yaml" so i did an: apt install yaml* but that didn't seem to help. Error log: https://paste.yunohost.org/raw/xanirarasi

mikerjensen commented 2 years ago

I took a look at the logs in more detail, the error message seemed to be: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator One suggestion to fix this i encountered was 'rfkill unblock wlan' - i tried this and it seems to have worked. Hotspot installed.

mikerjensen commented 2 years ago

So now i have the wifi hotspot connection to the RPI working fine, but seems some routing/firewall changes need to be made as I can't reach beyond the RPI via the hotspot connection. If I ssh over the connection into the box i can ping the rest of the world from there, but not from the machine connected to the hotspot.

5k4nd commented 2 years ago

Hi @mikerjensen, I just came across (and solved) a similar issue (everything's working except Internet connection to the rest of the world). Maybe I can help: could you please post the output of the following command iptables -nvL -t nat?

mikerjensen commented 2 years ago
Hi, thanks so much for following up on this. I just did a fresh
  install of the app after updating to the latest yunohost, and the
  result is the same. here are the results. aavs:~# iptables -nvL -t
  nat
  Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
   pkts bytes target     prot opt in     out    
  source               destination         

  Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
   pkts bytes target     prot opt in     out    
  source               destination         

  Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
   pkts bytes target     prot opt in     out    
  source               destination         
      0     0 MASQUERADE  all  --  *      202    
  0.0.0.0/0            0.0.0.0/0           

  Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
   pkts bytes target     prot opt in     out    
  source               destination 

On 10/11/21 01:02, Baptiste Abel wrote:

  Hi @mikerjensen,
    I just came across (and solved) a similar issue (everything's
    working except Internet connection to the rest of the world).
    Maybe I can help: could you please post the output of the
    following command iptables -nvL -t nat?
  —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub, or unsubscribe.
    Triage notifications on the go with GitHub Mobile for iOS or Android.

  [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "url": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

5k4nd commented 2 years ago

@mikerjensen ok it's the same issue as mine then, a fix his coming. In order to workaround, waiting for the fix to be deployed, I'll also need the output of ip route (sorry, I forgot to ask in my previous post)

mikerjensen commented 2 years ago
Hi, not really related to the problem, but I forgot to mention
  that the wifi hotspot install script allows you to use illegal
  characters for the WPA password (eg $)

then when you go to change/edit the installation in yunohost
  admin there is  the message:
Only printable alphanumeric characters
    are permitted in your password. Maximal size 63 chars
Mike

On 10/11/21 21:57, Mike Jensen wrote:

  Hi, thanks so much for following up on this. I just did a fresh
    install of the app after updating to the latest yunohost, and
    the result is the same. here are the results. aavs:~# iptables
    -nvL -t nat
    Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out    
    source               destination         

    Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out    
    source               destination         

    Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out    
    source               destination         
        0     0 MASQUERADE  all  --  *      202    
    0.0.0.0/0            0.0.0.0/0           

    Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out    
    source               destination 

  On 10/11/21 01:02, Baptiste Abel
    wrote:

    Hi @mikerjensen,
      I just came across (and solved) a similar issue (everything's
      working except Internet connection to the rest of the world).
      Maybe I can help: could you please post the output of the
      following command iptables -nvL -t nat?
    —
      You are receiving this because you were mentioned.
      Reply to this email directly, view it on GitHub, or unsubscribe.
      Triage notifications on the go with GitHub Mobile for iOS or Android. 
    [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "url": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

mikerjensen commented 2 years ago
I upgraded to the new version  of Wifi Hotspot that came in with
  Yunohost 4.3.3 today, and it all works a treat!
thanks  much

Mike

On 14/11/21 10:29, Mike Jensen wrote:

  Hi, not really related to the problem, but I forgot to mention
    that the wifi hotspot install script allows you to use illegal
    characters for the WPA password (eg $)

  then when you go to change/edit the installation in yunohost
    admin there is  the message:
  Only printable alphanumeric characters
      are permitted in your password. Maximal size 63 chars
  Mike

  On 10/11/21 21:57, Mike Jensen wrote:

    Hi, thanks so much for following up on this. I just did a
      fresh install of the app after updating to the latest
      yunohost, and the result is the same. here are the results.
      aavs:~# iptables -nvL -t nat
      Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
       pkts bytes target     prot opt in     out    
      source               destination         

      Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
       pkts bytes target     prot opt in     out    
      source               destination         

      Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
       pkts bytes target     prot opt in     out    
      source               destination         
          0     0 MASQUERADE  all  --  *      202    
      0.0.0.0/0            0.0.0.0/0           

      Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
       pkts bytes target     prot opt in     out    
      source               destination 

    On 10/11/21 01:02, Baptiste Abel
      wrote:

      Hi @mikerjensen, I just came
        across (and solved) a similar issue (everything's working
        except Internet connection to the rest of the world).
        Maybe I can help: could you please post the output of the
        following command iptables -nvL -t nat?
      —
        You are receiving this because you were mentioned.
        Reply to this email directly, view it on GitHub, or unsubscribe.
        Triage notifications on the go with GitHub Mobile for iOS or Android. 
      [

{ @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "url": "https://github.com/YunoHost-Apps/hotspot_ynh/issues/79#issuecomment-964684679", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

mikerjensen commented 2 years ago

I upgraded to the new version of Wifi Hotspot that came with Yunohost 4.3.3 today, and the hotspot worked fine after the initial install. However when I reconnected to the hotspot some hours later, i could connect, but I had no upstream connectivity. I rebooted and the RPI then routed my traffic correctly again...

alexAubin commented 11 months ago

Closing because 2 years old and the initial issue seems to be fixed, please open other tickets if there are still other issues