Jump to content

"Could not connect to internet." When Installing Depentencies


Recommended Posts

Once I've installed the Evil Portal Module, I select the module and I am prompted to install missing dependencies but even though I am connected to a WiFi network, I get the following error message: "Could not connect to internet."

Screenshot-2020-09-18-Wi-Fi-Pineapple.pn

Screenshot-2020-09-18-Wi-Fi-Pineapple.pn

Is anyone else getting this issue?

 

 

Link to post
Share on other sites

Hey @astinomia this is probably happening because your pineapples clock hasnt been synced yet causing there to be certificate errors when trying to install dependencies.

To check this, if you can open up the terminal and run `opkg update`. If that succeeds then you should be good to installing the dependencies. If it fails you can either wait for ntp to sync up your clock (should be every few minutes) or manually make it sync by running `/etc/init.d/ntpd stop && /etc/init.d/ntpd start`

Let me know if this solves your problem

  • Like 1
Link to post
Share on other sites

The `opkg update` command seem to work fine.

When I run `/etc/init.d/ntpd stop && /etc/init.d/ntpd start`, it says "bash: /etc/init.d/ntpd: No such file or directory".

Sometimes before the Dependencies window has time to load I see this error: "dial unix /tmp/modules/evilportal.sock: connect: resource temporarily unavailable". I'm guessing that is because I'm missing the dependencies or because it hasn't fully loaded?.

Also, its probably meaningless but I'm only seeing two rows instead of three of the "Could not connect to internet." error now. Restating doesn't seem to help.

Link to post
Share on other sites

Looks like this might be a DNS issue. Are you able to `ping example.com` from your pineapple?

Link to post
Share on other sites

Works fine.

root@mk7:/pineapple# ping google.com
PING google.com (172.217.1.174): 56 data bytes
64 bytes from 172.217.1.174: seq=0 ttl=114 time=33.915 ms
64 bytes from 172.217.1.174: seq=1 ttl=114 time=41.330 ms
64 bytes from 172.217.1.174: seq=2 ttl=114 time=28.066 ms
64 bytes from 172.217.1.174: seq=3 ttl=114 time=29.491 ms
64 bytes from 172.217.1.174: seq=4 ttl=114 time=29.997 ms
64 bytes from 172.217.1.174: seq=5 ttl=114 time=27.758 ms
64 bytes from 172.217.1.174: seq=6 ttl=114 time=30.324 ms
64 bytes from 172.217.1.174: seq=7 ttl=114 time=28.259 ms
64 bytes from 172.217.1.174: seq=8 ttl=114 time=29.914 ms
64 bytes from 172.217.1.174: seq=9 ttl=114 time=28.570 ms
^C
--- google.com ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 27.758/30.762/41.330 ms
Link to post
Share on other sites

Can you hit example.com specifically? This is what the module is using to try to determine if there is an internet connection.

If that does work then create a file on your pineapple called `internet_check.py` and paste this in it

from pineapple.helpers import network_helpers

print(network_helpers.check_for_internet())

save it then run `python3 ./internet_check.py`

If its able to connect it should print True otherwise it will print False.

If it does say false, edit the second line to look like this:

print(network_helpers.check_for_internet(timout=5))

(Make sure you don't spell `timeout` correctly.. I just noticed a typo I made in the library lol)

Run the script again: `python3 ./internet_check.py`

If that still says False, then for some reason the pineapple is having an issue resolving example.com. Change the line to look like this and try again:

print(network_helpers.check_for_internet(url='http://www.google.com', timout=5))

 

Link to post
Share on other sites
root@mk7:/pineapple# ping example.com
ping: bad address 'example.com'

Running the first & second version :

root@mk7:/pineapple# python3 ./internet_check.py 
False

Running the third version (url='http://www.google.com', timout=5)):

root@mk7:/pineapple# python3 ./internet_check.py 
True

Weird...

Link to post
Share on other sites
20 minutes ago, astinomia said:

root@mk7:/pineapple# ping example.com
ping: bad address 'example.com'

Running the first & second version :


root@mk7:/pineapple# python3 ./internet_check.py 
False

Running the third version (url='http://www.google.com', timout=5)):


root@mk7:/pineapple# python3 ./internet_check.py 
True

Weird...

Seems like something might be going on with your internet connection then. Are you able to get to http://example.com in your web browser?

A temporary fix for your issue - just to get you up and running - is to edit this file: `/usr/lib/pineapple/pineapple/helpers/network_helpers.py`

 Change `http://www.example.com` in the following line to `http://www.google.com`

def check_for_internet(url: str = 'http://www.example.com', timout: int = 1, logger: Optional[Logger] = None) -> bool:

 

  • Like 1
Link to post
Share on other sites
1 minute ago, newbi3 said:

Seems like something might be going on with your internet connection then. Are you able to get to http://example.com in your web browser?

A temporary fix for your issue - just to get you up and running - is to edit this file: `/usr/lib/pineapple/pineapple/helpers/network_helpers.py`

 Change `http://www.example.com` in the following line to `http://www.google.com`


def check_for_internet(url: str = 'http://www.example.com', timout: int = 1, logger: Optional[Logger] = None) -> bool:

 

Yes, I can open http://example.com in my browser, it seems to not work only on the pineapple. I changed it in the helper method, and it worked!

 

  • Like 1
Link to post
Share on other sites

Glad to hear!

This isn't is a permit solution but will work fine for now. We might pull this url out into a text file or make editable through the web interface in a future version of the firmware.

 

  • Like 1
Link to post
Share on other sites

This should now be fixed in firmware version 1.0.1 Beta 3 and newer. If anyone has issues going forward please report it.

 

  • Upvote 1
Link to post
Share on other sites

I had connection problems installing dependencies and with opkg but clients could access the internet normaly.

After I disabled IPv6 advertisements on my firewall (so the pineapple only had IPv4). The problem was solved.

Link to post
Share on other sites
On 9/30/2020 at 3:06 PM, Melroy said:

I had connection problems installing dependencies and with opkg but clients could access the internet normaly.

After I disabled IPv6 advertisements on my firewall (so the pineapple only had IPv4). The problem was solved.

Was this happening on the 1.0.1 Beta 3 version of the firmware?

Link to post
Share on other sites
3 hours ago, newbi3 said:

Was this happening on the 1.0.1 Beta 3 version of the firmware?

Hey @newbi3,

I wasn't able to get EvilPortal running on 1.0.1 BETA (reverting back to 1.0.0 worked later). It would install, but would skip the "Install Dependencies" page, and hang (with constant loading circles). I tried to pull from the log you mentioned, but it didn't exist... I even ran a search (find) and manually went through all the directories. Ended up flashing the firmware back to 1.0.0 and it then worked again.

I forgot to mention. I originally flashed the recovery firmware because after uninstalling and then reinstalling the module it caused the exact same issue that I originally wrote to you about. It also made it so the portals couldn't be activated, previewed, etc... along with hanging of the "Start web server".

Wish I had logs to give to you. If I encounter these issues again I'll make sure to dump them for you.

Thank you for your hard work!

Edited by Void-Byte
Link to post
Share on other sites
5 hours ago, newbi3 said:

Was this happening on the 1.0.1 Beta 3 version of the firmware?

Tested with the 1.0 en 1.01 beta. I use SophosXG 18 as firewall. And i only use IPv6 internally.

On WAN of the firewall i have IPv4 only.

Link to post
Share on other sites
9 hours ago, Void-Byte said:

...

I wasn't able to get EvilPortal running on 1.0.1 BETA (reverting back to 1.0.0 worked later). It would install, but would skip the "Install Dependencies" page, and hang (with constant loading circles). I tried to pull from the log you mentioned, but it didn't exist... I even ran a search (find) and manually went through all the directories. Ended up flashing the firmware back to 1.0.0 and it then worked again.

I forgot to mention. I originally flashed the recovery firmware because after uninstalling and then reinstalling the module it caused the exact same issue that I originally wrote to you about. It also made it so the portals couldn't be activated, previewed, etc... along with hanging of the "Start web server".

...

Hi,

This was caused by a missing SSL dependency required by a recent change to the Python module API/Framework. It's been fixed in 1.0.1 Beta 4. Thanks for reporting this!

 

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...