-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
One-click Deploy-to-Heroku broken #2949
Comments
I see this referenced on that git repo, but don't know if I should just abandon this all and attempt a second shot following those instructions: requarks/wiki-heroku#22 For now, will wait for more info on this issue. |
Following a google, I found this page: https://devcenter.heroku.com/articles/config-vars Following those instructions, I do ineed see: |
Looking at the The question is, then, what is What went wrong here? Also, where can I find whatever script is running here? |
I'm still eagerly awaiting feedback on this issue, have hacked in on it almost every day... @NGPixel, any thoughts on how to continue? I'd like to try the free heroku instance first before considering other options, I think this is an incredible way to make trying it out very approachable. I imagine it's a trivial fix, I am just not familiar with the piping here. Just a pointer at how/where the provisioning/scripting for the setup happening, or how to find out what the 'undefined:undefined' is so I can investigate further, would be helpful... |
I'm having the same problem.
I think "undefined:undefined" is output by the code here. |
Looks like it's supposed to pick up the And it looks like it's done correctly, too, according to these docs: https://devcenter.heroku.com/articles/config-vars#accessing-config-var-values-from-code |
hmm... this seems to be what we're running into: https://stackoverflow.com/a/19341505/4526479 |
I don't understand, though... that SO answer is from 2013. How can it have been broken for that long and still be broken?! Did this app deploy method just never work or something? But it's accepted and there are 21 upvotes... Surely we're just doing something wrong? |
there's some possibility that this might be necessary, even though it shouldn't be: https://devcenter.heroku.com/articles/heroku-postgresql#establish-primary-db It's at least something to try, I guess. |
I'm a bit confused--I'm familiar with heroku, but not so much with docker... when I added the heroku git remote from my local machine, there seems to be nothing to 'pull', and so I can't trigger a redeploy by pushing anything because there's no branch to grab that I can see. What am I missing here? That said, when I run So... I don't know, maybe it was just undefined on the first run and would be ok if I could force a redeploy, in which case the initial run was just before heroku had finished provisioning/attaching the DB and that needs to be dealt with? If someone can point me how to deploy this particular app, let me know... |
I was now able to run wikijs on Heroku! I specified the Heroku-postgressql version as 10.
https://devcenter.heroku.com/articles/heroku-postgresql#version-support |
@gupuru so the problem is probably that no version is specified, and heroku now auto-deploys a newer version of pg than the wiki repo can handle? Also, are you just running this command |
Yes. delete old database. |
delete the old database and use this repo . |
I found that the new database was added alongside the previous one, but added under a different process.env. So I deleted both, and will re-add it, and it was then added as the DATABASE_URL var now (since it's the only one after having deleted both the original and the one I just added). And sure enough, it loads now! Thanks! |
Thank you for this thread!! Downgrading to 10 worked for me. |
Keep in mind, after install, I found out that we're right on the cusp of a 3.0 release, which will add some really critical features. I am toying with 2.x in the background but waiting to release until 3. |
Thank you for your work @gupuru and @kylebakerio ! Turned a multi-hour struggle into about 10 minutes of getting things fixed up. Was a huge help! |
Been trying to figure out what's causing this issue. Wiki.js works just fine with PostgreSQL 13 so there seems to be something specific to Heroku which prevents the DATABASE_URL env var from being passed to the process. If somebody knows how to specify the db version as part of the manifest, to avoid having to run these manual commands, let me know. |
The issue is rather fishy. I did a setup and let the installation run by almost 2 weeks without touching it. Guess? It went back to failing to connect to database. Even though it was PSQL 10. I'm starting to doubt it has something to do with the version of the PSQL but more how the connection is handled. |
My install has worked fine since the changes I made (still working). |
It definitely seems to be Heroku specific and like a potential bug on their end. Might be worth discussing with them? Where is the heroku manifest file, @NGPixel ? |
What do your logs say? I just double checked, mine is still working perfectly. |
Here is the log. It appears to be the reported database problem. 2021-03-08T01:00:04.427900+00:00 app[web.1]: 2021-03-08T01:00:04.427Z [MASTER] �[33mwarn�[39m: Will retry in 3 seconds... [Attempt 9 of 10]
|
So, the adjustment worked here. But how can I restore database from the broken application to a new one, when postgresql has been downgrade? |
You can use pgadmin backup and restore. What I did was to create a completely new deployment, then attach a db with v10, then delete the v13 one, then backup from the original databaase, then restore to the newly created 10 db |
I tried something like this, but I got some errors when restoring the database backup from v12 to v10, but using only heroku cli and her tools. I'll try pgadmin |
I tried that, but it didn't work for me. Differences between database users (source v12 and target v10) generate many permission errors. |
I don't think this issue is specifically with Heroku, but rather because Wiki.js tries to be clever with Heroku's DATABASE_URL env variable, which isn't the normal way to configure this. Basically, when DATABASE_URL is set, You can reproduce this off Heroku just by setting the DATABASE_URL env variable and pointing it at a database that needs SSL. There's no way to turn on SSL (because Running wiki.js via a script that does
|
@hamptonsmith DATABASE_URL is the recommended way to connect to the Heroku DB, not via an object, as specified in https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js However, one interesting bit is they mention setting the ssl verify to false by setting an env var:
|
Added the PGSSLMODE env var to the heroku dockerfile and it now deploys successfully. |
Describe the bug
I attempted a 1-click install to heroku via the wiki.js website. The site fails to load, however.
To Reproduce
Steps to reproduce the behavior:
[...complete setup, etc.]
https://aframe-wiki.herokuapp.com/
(at this time, shows as seen in image below:)
Expected behavior
One-click deploy results in a functional site deployed
Screenshots
See above
Host Info (please complete the following information):
Additional context
Based on the heroku logs below, it seems to be a problem connecting with the database.
Also, when I attempted to clone down from heroku, I got an empty folder? That's confusing. I assume there's just some other workflow I don't know about, but I'm not exactly sure what to do with that. (To be clear: running
git clone https://git.heroku.com/aframe-wiki.git
got me an empty folder).I do see this line in the heroku one click page: "The database endpoint must be provided as DATABASE_URL environment variable to the app (default)."
However, more detail is needed. I'm quite unsure how to proceed.
Btw, the link for "Another option is to clone the wiki-heroku" is broken. It points to
https://github.com/Requarks/wiki-heroku/tree/beta
. I imagine it should be in sync with the button, and sayhttps://github.com/requarks/wiki-heroku/tree/2.x
Edit:
Just wanted to add that this is the build log from the original build:
The text was updated successfully, but these errors were encountered: