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

Fix install + bump to version 1.6 #19

Merged
merged 12 commits into from
Apr 27, 2020

Conversation

Lab-8916100448256
Copy link
Contributor

This is to upgrade to CodiMD version 1.6, issue #18

Tested on a Debian 9 virtual machine with yunohost 3.6.5.3.

CodiMD version 1.6 is supposed to still be compatible with nodejs version 8 but there was an error of a dependency complaining about nodejs version being too old. So I had to bump node version

The first commits are reverted. they were attempts at pinning yarn version to an older release to work around the issue with yarn error no such option: --pure-lockfile.
I failed at doing that in the script. I'm new to yunohost API
Instead I did it with a file on the server, as described in #17 (comment)

@Lab-8916100448256 Lab-8916100448256 mentioned this pull request Mar 9, 2020
@lapineige lapineige added the enhancement New feature or request label Mar 9, 2020
@lapineige
Copy link
Member

It still fails for me :((

Warning: [DEBUG]: DEBUG - + ynh_script_progression '--message=Building application... (this may take some time and resources!)'
Warning: [DEBUG]: DEBUG - + set +x
Warning: [DEBUG]: DEBUG - + set +x
Warning: [DEBUG]: DEBUG - + echo '! Helper used in legacy mode !'
Warning: [DEBUG]: DEBUG - + set +x
Warning: [DEBUG]: DEBUG - > Building application... (this may take some time and resources!)'
Warning: [DEBUG]: DEBUG - + set -x
Warning: [DEBUG]: DEBUG - + pushd /var/www/codimd
Warning: [DEBUG]: DEBUG - /var/www/codimd /var/cache/yunohost/from_file/codimd_ynh-CodiMD-1.6/scripts
Warning: [DEBUG]: DEBUG - + ./bin/setup
Warning: [DEBUG]: DEBUG - copy config files
Warning: [DEBUG]: DEBUG - install packages
Warning: [DEBUG]: DEBUG - + ynh_exit_properly
Warning:
Info: The operation 'Install 'codimd' application' has failed! To get help, please share the full log of this operation using the command 'yunohost log display DateAndTime-app_install-codimd --share'

@lapineige
Copy link
Member

Do you take into account this issue ? #20
I'm not sure to understand if it's the case or not.

@Lab-8916100448256
Copy link
Contributor Author

Do you take into account this issue ? #20
I'm not sure to understand if it's the case or not.

No, not in this PR. I worked around this issue locally on my server by blocking it from installing newer versions of yarn. as described in my comment here : #17 (comment)

@lapineige
Copy link
Member

Shouldn't we add that fix, if it's simply a matter of removing an argument ?

@Lab-8916100448256
Copy link
Contributor Author

Lab-8916100448256 commented Mar 25, 2020

I haven't found this argument in the yunohost app script. It is in CodyMD install script : https://github.com/codimd/server/blob/master/bin/setup

I'm no yunohost expert. Maybe there is a way to patch the setup script on the fly on yunohost side. But I think this should be patched upstream in CodyMD repository

@alexAubin
Copy link
Member

Randomly passing by, tested on Yunohost unstable in a LXC and the install seem to work ... Would love to see this app flagged as working in the app catalog

@alexAubin
Copy link
Member

Naively started a build on the dev CI, will see how it goes (after pixelfed finishes 😅 ) https://ci-apps-dev.yunohost.org/jenkins/view/aleks/job/codimd_ynh%20(aleks)/

@lapineige
Copy link
Member

Would love to see this app flagged as working in the app catalog

Would love to get it working 😅

@lapineige
Copy link
Member

It failed :(

@alexAubin
Copy link
Member

Sounds like a silly issue about manifest.json default value for is_public ... restarted a build after small fix (c.f. previous commit)

@alexAubin
Copy link
Member

Alright, there was some stupid crazy bug in the add_extra_apt_repo ... The --pure-lockfile bug was in fact due to yarn not being installed at all (so it kept some old version like 0.2 which didnt had this option).

Last build is at least installable : https://ci-apps-dev.yunohost.org/jenkins/view/aleks/job/codimd_ynh%20(aleks)/7/console

There's a 502 error in some more advanced test, probably because this is a heavy app that may take some time to load. Should probably add some options to "systemd_action start" to wait until the service is ready as for other apps.

But at least the app should be installable... (well modulo the fact that it seems to take as much CPU as mining 10 bitcoins just to build web assets lulz...)

@alexAubin alexAubin changed the title CodiMD version 1.6 Fix install + bump to version 1.6 Apr 27, 2020
@alexAubin
Copy link
Member

I'm taking the liberty to yolomerge this because the app is still flagged as "inprogress" for now on the applist anyway... Thanks @Lab-8916100448256 for the initial work on the PR

@alexAubin alexAubin merged commit 116959e into YunoHost-Apps:master Apr 27, 2020
@lapineige
Copy link
Member

And not working anyway, so it's a good thing your merged it.

After one or two thousand warnings (while building web assets), install succeed :) 🎉
It seems to work like a charm.

Thanks a lot @alexAubin and @Lab-8916100448256 🙂

@lapineige
Copy link
Member

Install fails with a raspberry pi (or any ARM architecture ?)
Logs: https://vps.lapineige.fr/privatebin/?01f5b00ceed9b4f9#S+xOn2Zmm9FK3RETGX5tnzmsAsr01XWLhz8tMHvW0sQ=

Full log, with lots of warnings/error messages: https://vps.lapineige.fr/privatebin/?6d61a804ee927e9c#+b7zubYX+KX+Kp5nu4EcMonXJWqY8+bWvAfv/F1WH5M=

@alexAubin
Copy link
Member

@lapineige Huuuu wokay, naively that looks like some temporary network issue ? x_X

@lapineige
Copy link
Member

Same issue on second try :(

@lapineige
Copy link
Member

@alexAubin
Copy link
Member

Alright, totally different error :

497568 WARNING Output:
497569 WARNING PhantomJS not found on PATH
497570 WARNING Unexpected platform or architecture: linux/arm
497572 WARNING It seems there is no binary available for your platform/architecture
497575 WARNING Try to install PhantomJS globally

It sounds like it needs something called PhantomJS and that let me think it not available for arm ... Maybe there's a slight chance we just need to install this manually somehow but I doubt

If that's confirmed that it's not available on arm, we should add a check for architecture at the beginning of the install script then..

@lapineige
Copy link
Member

It seems not to be available officially as a prebuilt package.
After a quick search, it seems that it's possible to compile it for ARM.
Examples:
https://github.com/fg2it/phantomjs-on-raspberry
https://github.com/aeberhardo/phantomjs-linux-armv6l

I don't know if we should try to compile it on-the-fly (on ARM it might takes forever…), or use one of these repository (with what kind of security risk ?) and maybe mark the support as experimental, or just disable ARM support (which will especially exclude all Raspberry Pi and Internet Cube owners… a lot of Yunohost users).

@nazmifr
Copy link

nazmifr commented Sep 6, 2020

I was faced with the fact that I can't install this app today, I dug a bit, especially on here:

Medium/phantomjs#433 (comment)

Turns out there is a package on the raspbian reps, it won't work on a headless server so I tried to define the variable in bash, it failed, so I tried to add it to /etc/environment which failed too, I get this error


04:56,014: WARNING - Considering PhantomJS found at /usr/bin/phantomjs
2020-09-06 23:04:56,015: DEBUG - + trap '' EXIT
2020-09-06 23:04:56,016: WARNING - Found PhantomJS at /usr/bin/phantomjs ...verifying
2020-09-06 23:04:56,016: DEBUG - + set +o errexit
2020-09-06 23:04:56,017: WARNING - Error verifying phantomjs, continuing Error: Command failed: /usr/bin/phantomjs --version
2020-09-06 23:04:56,017: DEBUG - + set +o nounset
2020-09-06 23:04:56,018: WARNING - qt.qpa.screen: QXcbConnection: Could not connect to display
2020-09-06 23:04:56,018: DEBUG - + sleep 0.5
2020-09-06 23:04:56,019: WARNING - Could not connect to any X display.
2020-09-06 23:04:56,019: WARNING - 
2020-09-06 23:04:56,020: WARNING -     at ChildProcess.exithandler (child_process.js:303:12)
2020-09-06 23:04:56,021: WARNING -     at ChildProcess.emit (events.js:315:20)
2020-09-06 23:04:56,021: WARNING -     at maybeClose (internal/child_process.js:1021:16)
2020-09-06 23:04:56,022: WARNING -     at Socket.<anonymous> (internal/child_process.js:443:11)
2020-09-06 23:04:56,023: WARNING -     at Socket.emit (events.js:315:20)
2020-09-06 23:04:56,024: WARNING -     at Pipe.<anonymous> (net.js:674:12) {
2020-09-06 23:04:56,024: WARNING -   killed: false,
2020-09-06 23:04:56,025: WARNING -   code: 1,
2020-09-06 23:04:56,026: WARNING -   signal: null,
2020-09-06 23:04:56,026: WARNING -   cmd: '/usr/bin/phantomjs --version'
2020-09-06 23:04:56,027: WARNING - }
2020-09-06 23:04:56,028: WARNING - Unexpected platform or architecture: linux/arm
2020-09-06 23:04:56,029: WARNING - It seems there is no binary available for your platform/architecture
2020-09-06 23:04:56,029: WARNING - Try to install PhantomJS globally

Is there any method to edit the script and add the variable for Qt before installing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants