Installation Query

That error means that the “formplayer” service isn’t running or that the primary server process cannot connect to it. There are two options for doing so, described here. Running the standalone jar is a bit simpler. I’d ensure that the process is running and that you’ve adjusted your localsettings as described.

Hello,

Thank you. Will try the jar process.

Hi,

I tried installing all the versions of java. Still getting an error. Could someone please guide as to which version to use?

Thank you.

Hi,

We recently upgraded FormPlayer to run with Java8. I believe we use the OpenJDK8 distribution on our servers. Can you clarify the error?

Hello,

Thank you. Will try with OpenJDK8.

The error message:

I don’t get any error messages on the terminal however when I try to use the app I get this error message.

Thank you.

Are there any traceback either from Formplayer or from CommCareHQ?

There are a number of places that could be an issue. One place to check is the developer tools window in the browser to see where it is making the request to - that will allow you to test if Formplayer is actually running at that URL. If not you may need to change FORMPLAYER_URL in settings.

Hello,

Looks like it is the FORMPLAYER_URL problem. I am going to re-start the installation.

I am not sure about the URL itself. Is it localhost:8000 or localhost:8010? My IP is 172.17.0.1:8000
The problem is I think I am using different IPs everywhere. Could you please tell me if this is right?

Thank you.

This should be the publicly accessible URL since it needs to be available from the browser. For a dev environment setup this is likely something like http://localhost:8010 (port that Formplayer is running on).

In a production environment you’ll most likely have Formplayer behind a reverse proxy and can create a location match to route requests to it. Then the URL would be something like https://www.mysite.com/formplayer

Hi,

Did try that and getting the following error.

image

I have installed commcare-hq as per the instructions in
https://github.com/dimagi/commcare-hq/blob/master/DEV_SETUP.md.

I am running the supporting services in docker. Django is running locally.

When I login to the application, I get following message:

OPTIONS http://localhost:8010/delete_application_dbs net::ERR_CONNECTION_REFUSED
send @ jquery.min.js:4
ajax @ jquery.min.js:4
(anonymous) @ app.js:530
triggerEvents @ backbone.js:369
triggerApi @ backbone.js:356
eventsApi @ backbone.js:155
Events.trigger @ backbone.js:346
receiver @ hq.events.js:47
postMessage (async)
_private.triggerPreviewEvent @ preview_app.js:95
(anonymous) @ preview_app.js:216
dispatch @ jquery.min.js:3
q.handle @ jquery.min.js:3
middleware.js:19 User navigated to selectApp

I tried running formplayer in docker. same error.
I also tried running formplayer.jar as
java -jar formplayer.jar --spring.config.name=formplayer
Still same error.

I can see the port (formplayer is configured to run on 8010) is listening at system side
tcp6 0 0 :::8010 :::* LISTEN

value of variable FORMPLAYER_INTERNAL_AUTH_KEY in localsettings.py and commcarehq.formplayerAuthKey in formplayer.properties are same.

Please give some information on what could cause this error.

Another observation is that I keep getting error in Developer window of the browser.

ws4redis.js:37 WebSocket connection to ‘ws://172.18.0.1:8000/ws/commcare-test:99eb2b3824788ae48ea49602ce004f4a:daec32b4fdb749799b31c1663aaaab77?subscribe-broadcast’ failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
connect @ ws4redis.js:37
(anonymous) @ ws4redis.js:56
ws4redis.js:100 Websocket connection is broken!

Can someone PLEASE help.

Thank you
Sneha

1 Like

Hi,

We are not getting the formplayer error while connecting locally from the server console.

However, while accessing Commcare-HQ from browsers on client systems, we get error connecting to formplayer.

The browser logs shows below error:

Google Chrome:

jquery.min.js:4 OPTIONS http://localhost:8010/delete_application_dbs net::ERR_CONNECTION_REFUSED

Firefox:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8010/delete_application_dbs. (Reason: CORS request did not succeed).

All the services and formplayer is running in Docker. Only Django is running locally.

Is there any network settings/changes to be done for enabling access from client systems (these systems are in the same network).

Thank you

Hey

This can happen when you are accessing HQ and formplayer on different host urls for ex. localhost vs 127.0.0.1 even though they practically directs you to the same page. So if your formplyaer url is defined as http://localhost:8080 make sure you are accessing HQ through a localhost url as well.

connection in the localhost is fine, but we are facing problem only while connecting from external clients. How do we provide URL for external clients.

I think the recommended production setup for external access is to proxy formplayer through a different URL on the same server using something like nginx.

In production Dimagi sets up www.commcarehq.org/formplayer to proxy the underlying formplayer URL which avoids the CORS issue.

1 Like

Thank you very much, the mobile app is working now!!!

I had another doubt. When I try to export data, I get the following error.

Hello can someone please help me with this??

Hi

Are there any errors in the log files for either the Django worker or the Celery task queue?

Hello,

Thank you. I will check and revert.

Regards,
Sneha

Hello,

I have another doubt, how to update this?
image
Thank you.

On the same page (Application Advanced Settings) enable the ‘Build Settings’:
image

From there you can select the CommCare Version that you are using.

When new versions of the CommCare mobile client are released you can add them to your local CommCare instance by going to https:///builds/edit_menu/ and following the instructions at the bottom of the page.

Thank you. Was able to fix this.

Suddenly the toolbar/taskbar with ‘Dashboard, Reports, Data, Users, Applications, Admin’ is missing. I wonder how! Is there a way to get this back?