Wifi Connect not displaying login credentials page on Raspberry Pi 3B+

I am setting up Wifi Connect on a Raspberry Pi 3B+ as part of our docker image.

We are successfully able to start wifi-connect (we can tell by the logs and the AP is active). However, when we connect to the Wifi Connect network on a mobile device, the “Sign in to network” notification shows, but when it is pressed we are brought to a blank page instead of the login credentials portal. If the user attempts to navigate to a webpage (i.e. www.google.com), we are not redirected to the login credentials portal either. It seems as though the webpage is not being served properly, or we have simply misconfigured something.

I have included our Dockerfile.template and start.sh script with the issue raised in github.

Hey @scarson is this a single container application or do you have other containers running? Also have you tried running the Dockerfile.template from the WiFi Connect project on your device unmodified - i.e. before adding the additional packages?

@scarson I’ve been doing some testing, it’s necessary to run the wifi-connect binary from it’s own directory.

For example I changed your Dockerfile.template to the below and it works OK:

FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:latest

RUN sudo apt-get -y update && \
    sudo apt-get -y install bluez build-essential cmake git libglib2.0-dev dnsmasq network-manager openjdk-8-jdk pkg-config sqlite3 wireless-tools && \
    sudo apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
ENV DBUS_SYSTEM_BUS_ADDRESS unix:path=/host/run/dbus/system_bus_socket

WORKDIR /usr/src/wifi-connect
RUN curl https://api.github.com/repos/balena-io/wifi-connect/releases/latest -s \
    | grep -hoP 'browser_download_url": "\K.*%%BALENA_ARCH%%\.tar\.gz' \
    | xargs -n1 curl -Ls \
    | tar -xvz -C /usr/src/wifi-connect/

WORKDIR /usr/src/wifi-connect/

COPY ./start.sh ./
CMD ./start.sh

Thanks @chrisys. That solved the problem. Is it possible to add that to the wifi-connect documentation?

Yeah it should be mentioned somewhere - I’ll make an issue. There is an argument (-u) used to specify the UI directory too, but I agree it isn’t clear that this is what the issue is, it took me a while to figure it out.

I can submit a PR for the README update if needed

That would be great! Please go ahead!

You’ll need to include a message like the below in the body of your commit message to allow our CI to pass:

Change-type: patch
Signed-off-by: Bob Ross <bob@ross.com>