tried to build jamovi

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

tried to build jamovi

Post by ac27037 »

Dear all,

After I successfully build jamovi on my server (ubuntu 20), it shows that:

Recreating jamovi_jamovi-deps_1 ... done
Recreating jamovi ... done
Attaching to jamovi_jamovi-deps_1, jamovi
jamovi_jamovi-deps_1 exited with code 0
jamovi | jamovi
jamovi | version: 0.0.0
jamovi | cli: 0.0.0
jamovi | [Errno 2] No such file or directory: '/root/.jamovi/settings.json'
jamovi | ports: 41337, 41338, 41339
jamovi | jamovi.server.session - creating instance: c9a61277-908c-4470-a7b7-209a18c065ef
jamovi | instance_started c9a61277-908c-4470-a7b7-209a18c065ef
jamovi | 404 GET /modules/lsj-data?v=1.0.1.0 (114.46.178.3) 0.71ms
jamovi | 404 GET /modules/r-datasets?v=1.0.1.0 (114.46.178.3) 0.88ms

When I connect to the server with port:41337, it works, but when I click any one of the statistic procedures, it shows that the contents of the web page has been blocked.

I cannot figure it out that:

(1) [Errno 2] No such file or directory: '/root/.jamovi/settings.json'
(2) the contents of the web page has been blocked

How do I deal with these two questions? Please help me! Thank you!

Vinco
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: tried to build jamovi

Post by jonathon »

hi vinco,

don't worry about (1), i'll fix that.

(2) what url are you accessing jamovi at?

127.0.0.1:41337?

kind regards
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

Re: tried to build jamovi

Post by ac27037 »

Hello Jonathon,

Yes, I was accessing 127.0.0.1:41337 and the main web page has shown successfully, but with two error messages (before I click any links in statistical analyses):

jamovi | 404 GET /modules/lsj-data?v=1.0.1.0 (114.46.178.3) 0.71ms
jamovi | 404 GET /modules/r-datasets?v=1.0.1.0 (114.46.178.3) 0.88ms

I have tried to go to the docker container and I found 'modules' exists at /usr/lib/jamovi/, but I don't know the working directory of tornado web server. I am not very familiar with this server, so I cannot figure it out what happened.

root@e8ea38661391:/usr/lib/jamovi# ls -al
total 48
drwxr-xr-x 1 root root 4096 May 6 18:18 .
drwxr-xr-x 1 root root 4096 May 7 01:19 ..
drwxr-xr-x 1 root root 4096 May 6 19:25 bin
drwxr-xr-x 1 root root 4096 May 6 18:58 client
drwxr-xr-x 3 root root 4096 May 6 18:18 i18n
drwxr-xr-x 1 root root 4096 May 6 18:12 modules
drwxr-xr-x 1 root root 4096 May 6 17:59 server
-rw-r--r-- 1 root root 8 May 6 09:30 version

I have also tried to understand the how the handler works (in the following code of server.py), but it is, for me, a liitle complicated to figure out the setting of the module_path.

class ModuleAssetHandler(RequestHandler):

def get(self, instance_id, analysis_id, path):
instance = self._session.get(instance_id)
if instance is None:
self.set_status(404)
self.write('<h1>404</h1>')
self.write('instance ' + instance_id + ' could not be found')
return

analysis = instance.analyses.get(int(analysis_id))
module_name = analysis.ns
module_path = Modules.instance().get(module_name).path
asset_path = os.path.join(module_path, 'R', analysis.ns, path)

if asset_path.startswith(module_path) is False:
self.set_status(403)
self.write('<h1>403</h1>')
self.write('verboten')
return

mt = mimetypes.guess_type(asset_path)

with open(asset_path, 'rb') as file:
content = file.read()
if mt[0] is not None:
self.set_header('Content-Type', mt[0])
if mt[1] is not None:
self.set_header('Content-Encoding', mt[1])
self.set_header('Cache-Control', 'private, no-cache, must-revalidate, max-age=0')
self.write(content)

It seems that 41337 is for the main page, and 41338 or 41339 is for handing the statistics computing or others. I am not sure whether this is the correct interpretation, but I have tried my best! Thank you for your response!

Please help me, thank you!

Vinco
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: tried to build jamovi

Post by jonathon »

main web page has shown successfully, but with two error messages
you can ignore these, jamovi will still function correctly and they are unrelated to the problem you are having.
It seems that 41337 is for the main page, and 41338 or 41339 is for handing the statistics computing or others.
that's correct.

but i'm trying to understand if the problem is because your browser can't reach 41338, and 41339, or if it's because of a CSP violation. what exactly does the browser say?

you can check to see if the additional ports are open by visiting 127.0.0.1:41338 and see if anything comes up.

jonathon
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

Re: tried to build jamovi

Post by ac27037 »

Hello,

I use chrome browser to assess the 41338 and 41339, and both respond:

404: Not Found

Vinco
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

Re: tried to build jamovi

Post by ac27037 »

Hello,

I have tried to disable CSP (through a plugin of Chrome browser for testing apps) and it did not appear 'the content has been blocked" and showed the results of analyses.

Vinco
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: tried to build jamovi

Post by jonathon »

so it sounds like a CSP issue then.

mine works, and this is what it looks like:
Screen Shot 2022-05-07 at 16.05.42.png
Screen Shot 2022-05-07 at 16.05.42.png (235.87 KiB) Viewed 1434 times
it would be worth seeing what value yours has.

this is where the value in constructed:

https://github.com/jamovi/jamovi/blob/c ... #L721-L734

cheers
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

Re: tried to build jamovi

Post by ac27037 »

Hi, Jonathon,

I have finally figured out where the problem is. I did not change the IP address in docker-compose.yaml, and server.py. I would suggest that we may give steps as more information on github and users can handle the CSP problem accordingly.

After testing the established system (jamovi), I observed that it was busy working sometimes, and did not generate outputs. To solve the problem, I have to restart the docker-compose. Is there any way to avoid such an 'idle' problem? Thank you!

Vinco
Attachments
jamovi-no-responseJPG.JPG
jamovi-no-responseJPG.JPG (32.76 KiB) Viewed 1361 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: tried to build jamovi

Post by jonathon »

hi sorry,

i've never seen that problem before. if you can provides steps to reproduce, i'll take a look.

you can see if the cloud version does the same thing: https://cloud.jamovi.org

jonathon
ac27037
Posts: 10
Joined: Fri May 06, 2022 2:45 am

Re: tried to build jamovi

Post by ac27037 »

Hi,

Yes, the same situation occurs in the cloud system (see the attached), but the version I built did not show the message of 'current time limits'.

The steps I operated was open the RTFM data and ran Two-way ANOVA. During the process, I quickly checked and pressed the items in each section. Especially, if I put an inappropriate variable to the independent factor, it is easier to crash the instance.

When I tried it in the second round, it did not crash as the previous one.

Vinco
Attachments
jamovi-cloud-broken.JPG
jamovi-cloud-broken.JPG (102.97 KiB) Viewed 1313 times
Post Reply