Commit 6626d65a authored by Robert Knight's avatar Robert Knight

Update mobile testing docs

Update the documentation for testing the client on mobile devices
following the merge of https://github.com/hypothesis/h/pull/5758.

 - Remove the step involving changing the `CLIENT_URL` env var in the h
   dev environment

 - Add a Troubleshooting section
parent 1c80ed66
......@@ -13,7 +13,8 @@ tested with at least current versions of iOS Safari and Chrome for Android.
#. Configure h to allow incoming connections from other systems
by editing ``conf/development-app.ini`` and changing the ``host`` setting from
``localhost`` to ``0.0.0.0``.
``localhost`` to ``0.0.0.0``. You will need to restart the h dev server after
making this change.
#. Get the hostname of your development system (``<HOSTNAME>``
in the steps below). You can do this using the ``hostname`` terminal command on
......@@ -28,24 +29,19 @@ tested with at least current versions of iOS Safari and Chrome for Android.
accessible from other devices on the network. If you have problems using
the hostname, try using the IP address instead.
#. Set the :envvar:`CLIENT_URL` environment variable to configure h
to load the client from this host and start the dev server:
.. code-block:: sh
# In the h repository
#. On your mobile device, go to a page which has the client embedded such as
``http://<HOSTNAME>:3000`` or ``http://<HOSTNAME>:5000/docs/help``.
# Configure the URL that the client is loaded from in pages
# that embed Hypothesis
export CLIENT_URL=http://<HOSTNAME>:3001/hypothesis
These URLs will also work on your development system.
make dev
#. Make sure the "Redirect URL" of the OAuth client associated with your
development client matches `<HOSTNAME>`. You can configure the OAuth clients
registered with h at http://localhost:5000/admin/oauthclients.
Troubleshooting
###############
This step is necessary to make logging into the client work.
- If logging into the client does not work when the client is accessed via
a non-localhost URL, make sure the "Redirect URL" for the Hypothesis client's
"OAuth client" (managed at http://localhost:5000/admin/oauthclients) is
set to ``{current_scheme}://{current_host}:5000``.
#. On your mobile device, go to a page which has the client embedded such as
``http://<HOSTNAME>:3000`` or ``http://<HOSTNAME>:5000/docs/help``.
- Make sure that you are not overriding the ``CLIENT_URL`` env var in your h
environment or ``SIDEBAR_APP_URL`` env var in your client dev environment
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment