Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Devel]: esci module for jasp #2842

Open
2 of 3 tasks
gdcumming opened this issue Jul 25, 2024 · 24 comments
Open
2 of 3 tasks

[Devel]: esci module for jasp #2842

gdcumming opened this issue Jul 25, 2024 · 24 comments

Comments

@gdcumming
Copy link

JASP Version

0.19.0

Commit ID

JASP msi uploaded 10:44 23-07-2024

JASP Module

Unrelated

What analysis are you seeing the problem on?

No response

What OS are you seeing the problem on?

Windows 10

Bug Description

Following advice from R Calin-Jageman, who is developing esci to use inside JASP, I downloaded and installed yesterday's nightlie JASP msi. Run JASP: all seems fine. (I had uninstalled, deleted, any earlier traces of JASP.)
I then checked to see R Console and typed 'sessionInfo()' but rec'd error message 'cannot change working directory' as in screenshot
Same result whether I ran JASP as administrator for my PC, or not.

image

Expected Behaviour

Wanted to be able to install a Module (esci)

Steps to Reproduce

  1. Instal and run JASP
  2. Check R Console
  3. Type 'sessionInfo()'

Log (if any)

No response

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.
@tomtomme
Copy link
Member

tomtomme commented Jul 25, 2024

Thx @gdcumming for the report! I love your book by the way :D
The error should certainly be adressed, but if you want to install a dev module in jasp, you usually would not do that via an R terminal.
Look here on how to install a dev-module: https://github.com/jasp-stats/jasp-desktop/blob/stable/Docs/development/jasp-module-workflow.md

In short:
If you have already downlaoded esci for JASP from github, first make sure, that the package is a .tar.gz archive. If it is a .zip you need to repackage it to said format.

Then to install the esci module in JASP:

  1. Open JASP
  2. Click on the plus symbol in the top right corner
  3. Click on Install Developer Module and select the .tar.gz
  4. Then wait patiently while the module is build and hope that it succeeds!

If you can point me to the esci repository on github I would be delighted to also test the module so that we could share our experience (and bug reports) here :D

@shun2wang
Do you have an idea what this error message is about?

While gdcumming is on the latest nightly, I am on flatpak 0.19 stable and get no error:

sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: KDE Flatpak runtime

Matrix products: default
BLAS:   /app/lib64/R/lib/libRblas.so 
LAPACK: /app/lib64/R/lib/libRlapack.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=de_DE.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Berlin
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] jaspDescriptives_0.19.0 jaspBase_0.19.0         Rcpp_1.0.12            

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       cli_3.6.3         rlang_1.1.4       generics_0.1.3   
 [5] textshaping_0.4.0 glue_1.7.0        colorspace_2.1-0  gridExtra_2.3    
 [9] ragg_1.3.2        scales_1.3.0      fansi_1.0.6       grid_4.4.1       
[13] munsell_0.5.1     tibble_3.2.1      lifecycle_1.0.4   compiler_4.4.1   
[17] dplyr_1.1.4       codetools_0.2-20  pkgconfig_2.0.3   systemfonts_1.1.0
[21] R6_2.5.1          tidyselect_1.2.1  utf8_1.2.4        pillar_1.9.0     
[25] jaspGraphs_0.19.0 magrittr_2.0.3    gtable_0.3.5      ggplot2_3.5.1   

@tomtomme tomtomme added the Component: R Syntax Related to Syntax label Jul 25, 2024
@shun2wang
Copy link
Contributor

JASP msi uploaded 10:44 23-07-2024

I cannot find this upload...

but yes, it not loaded in welcome page explicitly, but if you change the analysis in the drop-down and it will load them.

@gdcumming
Copy link
Author

gdcumming commented Jul 26, 2024 via email

@tomtomme
Copy link
Member

"see error below"

Geoff, did you attach a screenshot with said error via email? Sadly those cannot be seen her on github. Please drag and drop the ereor message directly via github.com in the browser,

thx for the other hints and the link. Will check out if I can reproduce the error in the next days.

@tomtomme
Copy link
Member

So I tested esci 1.0.3 tar.gz from the link you provided on JASP 0.19 stable flatpak (currently no newer flatpak beta available). And I can confirm that installing esci through the "install module" button does not work. It crahes JASP completely with:

flatpak run --branch=stable --devel org.jaspstats.JASP
Desktop:        QML cache directory: /home/tom/.var/app/org.jaspstats.JASP/cache/JASP/JASP/qmlcache_78d4157f08e81b1ea48ebe2f8f1a054b1ed563f0
Making new argument list for Application startup: JASP
Starting JASP 0.19 from commit 78d4157f08e81b1ea48ebe2f8f1a054b1ed563f0 and branch HEAD
QtWebEngineQuick initialized
Application initialized
Application init entered
MainWindow constructor started
TempFiles::createSessionDir(): '/home/tom/.JASP/temp/3' about to be (removed and re)created.
Going to construct the necessary models for JASP to function.
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-tr.qm
Desktop:        Invalid translation file found with name: jaspDesktop-tr.qm
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-ru.qm
Desktop:        Language (Russian) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-es.qm
Desktop:        Language (Spanish) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pt_BR.qm
Desktop:        Invalid translation file found with name: jaspDesktop-pt_BR.qm
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-zh_Hans.qm
Desktop:        Language (Chinese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-ja.qm
Desktop:        Language (Japanese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-fr.qm
Desktop:        Language (French) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-nl.qm
Desktop:        Language (Dutch) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-zh_Hant.qm
Desktop:        Language (Chinese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pl.qm
Desktop:        Language (Polish) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-de.qm
Desktop:        Language (German) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-it.qm
Desktop:        Language (Italian) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-id.qm
Desktop:        Language (Indonesian) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-gl.qm
Desktop:        Language (Galician) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pt.qm
Desktop:        Language (Portuguese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-eo.qm
Desktop:        Invalid translation file found with name: jaspDesktop-eo.qm
Desktop:        loadQmFile(/app/bin/../Resources/Translations/jaspDesktop-de.qm)
Desktop:        Opened internal sqlite database for creation at '/home/tom/.JASP/temp/3/internal.sqlite'.
Desktop:        DataSet::DataSet(index=-1)
Desktop:        DataSetPackage::reset()
Desktop:        DataSet::DataSet(index=-1)
Desktop:        DataSetPackage::endLoadingData
Entering eventloop
Error in loadNamespace(x) : es gibt kein Paket namens ‘jaspBase’
Error in loadNamespace(x) : es gibt kein Paket namens ‘jaspBase’
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
Uncaught std::exception! Was: std::exception
Object 0x56039dee5550 destroyed while one of its QML signal handlers is in progress.
Most likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested event loop.
This behavior is NOT supported!
qrc:/components/JASP/Widgets/ModulesMenu.qml:189: function() { [native code] }
/app/bin/org.jaspstats.JASP: Zeile 10:     3 Abgebrochen             (Speicherabzug geschrieben) JASP

Would still be cool, if you could upload the error that you get here.

@tomtomme tomtomme added the Waiting for requester If waiting for a long time it is reasonable to close an issue label Jul 26, 2024
@gdcumming
Copy link
Author

gdcumming commented Jul 26, 2024 via email

@github-actions github-actions bot removed the Waiting for requester If waiting for a long time it is reasonable to close an issue label Jul 26, 2024
@gdcumming
Copy link
Author

jasp error shot
jaspesci_0.1.0.tar.gz
Probably redundant but here are the two files again
Geoff

@rcalinjageman
Copy link

Hi all,

I think there's been a bit of miscommunication.

I'm trying to help Geoff be able to preview the esci module I've been developing for JASP. That module is on github at: https://github.com/rcalinjageman/jaspesci (the github link Geoff gave is not correct; sorry, Tom).

We've been running into trouble making it possible for Geoff to install the module -- we've tried both msi and zip versions of Jasp, both with .18 and .19 on his computer, and we've not been able to get the module to install. We made sure Geoff has rtools installed as well. This is what led us down the wrong path with the 'cannot change working directory' errror that I encouraged Geoff to submit -- to make sure we were matching Rtools to the version of R in jasp, we tried using the Rconsole to run "sessionInfo()".. but kept getting that strange working directory error... I had thought that indicated some general error communicating with R that might have prevented the module from installing on his computer, but it looks like that is not the case.

So... please ignore the 'cannot change working directory' issue -- but we could use some help figuring out how to enable Geoff to install the module I'm working on so he can help provide me with feedback. That's where Geoff keeps getting the error he screenshotted above -- that the module will not install; but I've generally been able to install this module across multiple machines without problem.

@EJWagenmakers
Copy link
Collaborator

@RensDofferhoff It would be great to have the esci module in JASP. Could you help Geoff as much as possible please?

@RensDofferhoff
Copy link

@rcalinjageman Module looks nice! I have made a PR on your repo to fix a small thing

@gdcumming Goodmorning!
I just tested the module at https://github.com/rcalinjageman/jaspesci on the latest jasp nightly on windows 11.
Lets go through a basic checklist:

  1. Download the same nightly https://static.jasp-stats.org/Nightlies/WindowsZip/JASP-nightly-development-14b4e60bdcf59b4ca65f8e8db27245de75201a19.zip
  2. Extract it to a folder (recommend using 7zip as windows zip utility is slow)
  3. Check that you have rtools44 installed at C:\rtools44\
  4. type "environment" in the windows search bar and open: image
  5. Make sure that you set "C:\rtools44\usr\bin" in the system path: image
  6. Now open the JASP executable in the folder where you extracted the zip and try to install the module

If that doesn't work go to:
image

And share the two most recent log files with us. Both the desktop and engine log.
We hope to make improvements to this system in the future so we can compile modules using the default R chain and load those. There are many environment variables in the R system compile chain unfortunately

@shun2wang
Copy link
Contributor

shun2wang commented Jul 29, 2024

Supplementary for what @RensDofferhoff suggestions:

  1. unzip the .tar.gz file (or git clone the project) and try install from the project developer folder path in settings. I reproduce it with .tar.gz but the folder way is OK.
  2. using a private GITHUB_PAT but not default PAT to avoid GitHub rate limiting issue.

@shun2wang shun2wang removed their assignment Jul 29, 2024
@shun2wang shun2wang changed the title [Bug]: Cannot change working directory [Bug]: Cannot install development module form .tar.gz file Jul 29, 2024
@shun2wang shun2wang removed the Component: R Syntax Related to Syntax label Jul 29, 2024
@tomtomme tomtomme added Bug: High Bugs that are negatively affecting the area of the program, but don't need immediate fix. and removed Bug labels Jul 29, 2024
@rcalinjageman
Copy link

Thanks for all the help with this -- much appreciated.

I worked with Geoff tonight to make sure he has the right version of rtools installed and that it is in his system path. He's going to uninstall the Jasp msi he installed and start over with the one you linked, but it might take him a day or two to get to it.

Thanks for the PR -- I had borked that yesterday as I was wrapping up some work on the module and then caught it myself this morning.

I've generally had no problem getting jasp to install the module I've been working on -- It's working on my home computer, my work computer, and I even set it up on my daughter's computer to give Geoff a computer to remote into to preview the module. I've had luck with both 0.18 nightlies and rtools 4.3 and 0.19 nighltlies with rtools 4.4. But oddly enough, on a couple of daays ago (27th) I tried setting up to do some work on an old laptop for a trip, and ran into issues:

  • On this laptop, I'm working from an unzipped version of JASP-nightly-development-14b4e60bdcf59b4ca65f8e8db27245de75201a19.zip
  • Rtools 4.4 is installed and in the system path
  • I've cloned my jaspesci repo from github
  • When I try to install the developer module I get:

00:02:10.277: Was a failure, now crafting answer.
00:02:10.277: Error was:
'\U' used without hex digits in character string (:6:72)
value[3]
tryCatchOne(expr, names, parentenv, handlers[[1]])
tryCatchList(expr, classes, parentenv, handlers)
00:02:10.277: Sending it.

Which, I think is most often caused by a \ in a file path where a // should be... yet I don't get this on any other machine pulling the same repo, and I can't easily find the source (not sure how to read :6:72 in terms of trying to track this down). I tried downloading the nighty you linked and got the same.

This isn't a high priority -- I don't really need yet another machine to develop on -- but it is strange!

@gdcumming
Copy link
Author

gdcumming commented Jul 31, 2024

Thanks all!
Bob on zoom took me through checking that rtools44 is installed and in the system path.
I uninstalled JASP.
Following Rens I downloaded the nightlie ...201a19.zip
Used 7zip to unzip
Ran jasp.exe
Saw JASP front page, with dialogue box "You'll need a new app..." as here:
screenshot need new app 31 Jul 24
...the OK button was not live. Clicked in jasp front page, dialogue box disappeared.
Checked log files were active.
Clicked large plus, saw Rconsole was on and R menu in top bar of JASP. Clicked to install module.
Selected jaspesci_0.1.0.tar.gz of 23.7.24
Failed to instal, error message as here:
instal jaspesci failed 31 Jul 24
Two error logs were:
JASP 2024-07-31 14_54_35 Engine 0.log
JASP 2024-07-31 14_54_35 Desktop.log
Thank you for detective work.
Standing by...
Geoff

@RensDofferhoff
Copy link

RensDofferhoff commented Jul 31, 2024

@gdcumming Ah seems there is a bug using the .tar.gz Install method! I will need to resolve this

Our developers always use the "Install developer module" option.
image

In the advanced preferences select the folder with the module and click the "Install developer module" :
image

I assume you will help the development of this module? So this is probably the better option. Otherwise I can also make a special JASP build for you that includes the module.
If anything is unclear we can always hop on a call!

-Rens Dofferhoff

@gdcumming
Copy link
Author

When I tried that selecting and then used 'install developer module', jasp immediately closed. (I'd tried that a couple of times before, always same result.)
Bob prepared a folder "jaspesci-master". I tried the same, that folder was selected, fine. Clicked 'install developer module', waited a couple of minutes, then error:

instal jaspesci-master failed 2 Aug 24

Log files:
JASP 2024-08-02 20_22_16 Desktop.log
JASP 2024-08-02 20_22_16 Engine 0.log

@RensDofferhoff
Copy link

RensDofferhoff commented Aug 2, 2024

okay this is good progress! We are almost there.

Please enter a github PAT under advanced settings:
image

@rcalinjageman
Copy link

Uh oh.

I started having this issue on my main development machine this morning -- after several weeks of no problems and with no updates to jasp. Seeing your comment here, I utilized the PAT you provided. That fixed things for a bit, but after a few cycles of code edits, I got the error again. When I went to preferences, there was no longer an indication the PAT was stored. I re-entered it, and again things worked, but after a few cycles I again started getting download errors. I've tried a bunch of different things (restarting JASP, switching back to the default PAT... but no joy... now no longer able to progress.

@RensDofferhoff
Copy link

@rcalinjageman @gdcumming I will make a new nightly build with a new valid PAT.
Unfortunate timing for the old one to expire.
Will report back when it is done

@RensDofferhoff
Copy link

@RensDofferhoff
Copy link

We are working to simplify this process in the future along with a module store

@rcalinjageman
Copy link

New build got me back on track. Geoff is prepping for a long trip and may not get a chance to try out the new build for a while. Thanks for the help -- I've got 2 analyses left to work on to have a complete draft of esci in jasp -- then I'll have a bunch of little issues to work on.

@RensDofferhoff
Copy link

All development nightly builds from this point should have a fixed PAT.
@rcalinjageman Let me know if/when you need anything!

@tomtomme
Copy link
Member

tomtomme commented Dec 3, 2024

Type 'sessionInfo()' works for me on latest 0.19.2 flatpak beta.
Testing the new libpath installation method now @ internal issue https://github.com/jasp-stats/INTERNAL-jasp/issues/2617.
Will report back.

@tomtomme
Copy link
Member

@rcalinjageman
How is it going? Any help you need?

@tomtomme tomtomme changed the title [Bug]: Cannot install development module form .tar.gz file [Devel]: esci module for jasp Jan 22, 2025
@tomtomme tomtomme added Developer and removed Bug: High Bugs that are negatively affecting the area of the program, but don't need immediate fix. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants