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

Unable to do a fresh install #1608

Closed
Asara opened this issue Jan 20, 2016 · 38 comments
Closed

Unable to do a fresh install #1608

Asara opened this issue Jan 20, 2016 · 38 comments
Labels
Milestone

Comments

@Asara
Copy link

Asara commented Jan 20, 2016

When doing a fresh install using composer:

I am able to create a new user, but logging in as the new user causes /login_check to give me a internal service error:

CRITICAL - Fatal Error: Call to a member function getLanguage() on null
CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Call to a member function getLanguage() on null" at /usr/local/www/apache24/wallabag/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php line 33 

Going to the root url brings me to the quickstart page so that isn't a 'breaking' issue. However whenever adding new links or importing from pocket, I get the following error:

CRITICAL - Fatal Error: Call to a member function getTaggingRules() on null
CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Call to a member function getTaggingRules() on null" at /usr/local/www/apache24/wallabag/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php line 103 

Furthermore, trying to get to the config page of a new user leads to this:

WARNING - Translation not found. (lots of times)
CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "Impossible to access an attribute ("taggingRules") on a null variable in "WallabagCoreBundle:Config:index.html.twig" at line 197" at /usr/local/www/apache24/wallabag/var/cache/dev/classes.php line 4854 

None of these issues occur when using the user created during the installation phase (admin user).

Thanks.

@tcitworld tcitworld added the Bug label Jan 20, 2016
@nicosomb nicosomb added this to the 2.0.0-beta.1 milestone Jan 21, 2016
@j0k3r
Copy link
Member

j0k3r commented Jan 21, 2016

Hum, this means no config entry was created when you added a new user.

Could you tell us which version are you using? Did you got an error when adding a new user?
Could you check how many lines do you have in the config table? You must have as many lines as in the user table.
Could you try to add a new user and see if a new line is also created in the config table?

@Asara
Copy link
Author

Asara commented Jan 21, 2016

I have just been using the v2 branch, so whatever the most updated version of it was when I posted the message.
I am no longer able to reproduce this issue because with a new fresh install, I am unable to get that far.

When using git clone and then composer install, I run into these errors:

PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 72 bytes) in phar:///usr/local/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 100
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 72 bytes) in phar:///usr/local/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 100
zend_mm_heap corrupted

On the other hand, when using:

composer create-project wallabag/wallabag wallabag 2.0.0-alpha.1

Everything seemingly gets installed, but when I do a server:run after wallabag:install, I get a html page with no css or js rendering.

What exactly is the recommended method of installing?

@tcitworld
Copy link
Member

Everything seemingly gets installed, but when I do a server:run after wallabag:install, I get a html page with no css or js rendering.

Looks like a duplicate of #1613

@Asara
Copy link
Author

Asara commented Jan 22, 2016

It totally is now. Using fBSD 10.2 as well.

Will close the issue

@Asara
Copy link
Author

Asara commented Feb 5, 2016

Now that you can enable a user without email confirmation, the original issue posted here still exists.

@j0k3r
Copy link
Member

j0k3r commented Feb 5, 2016

Which one ? The fatal error related to getLanguage, the memory limit ?

@Asara
Copy link
Author

Asara commented Feb 5, 2016

getLanguage and getTaggingRules and twig throwing exceptions because it can't find taggingRules as well.

@j0k3r
Copy link
Member

j0k3r commented Feb 12, 2016

I've tested again and everything is fine.
Could you try again using these commands to install ?

SYMFONY_ENV=prod php -d memory_limit=-1 /usr/local/bin/composer create-project wallabag/wallabag wallabag "2.x-dev" --no-dev
php bin/console --env=prod wallabag:install

Don't forget to define fosuser_confirmation at false when installing.

Also, don't forget to run the server in prod env at the end (if you are using the server:run command):

php bin/console --env=prod server:run

@Asara
Copy link
Author

Asara commented Feb 12, 2016

So using those commands to install, I don't get the tagging rules error, but still get the getLanguage error (using bot en and en_US.UTF-8 as my locale) when logging in as a newly registered user at https://domain.com/login_check

Fatal error: Call to a member function getLanguage() on null in /usr/local/www/apache24/wallabag/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php on line 33
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. 

Also using those commands, it seems like wallabag isn't able to pick up my pocket_consumer_key from app/config/paramaters either...

Pocket import isn't configured. Your server admin needs to define an API Key for Pocket. 

@Asara
Copy link
Author

Asara commented Feb 12, 2016

Also adding a new article leads to the same "get taggingRules" error as before

Fatal error: Call to a member function getTaggingRules() on null in /usr/local/www/apache24/wallabag/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php on line 103
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused. 

@j0k3r
Copy link
Member

j0k3r commented Feb 12, 2016

Actually I've no idea on how it happen 😞

Could you please detail each step your are doing? Which command, which action on the browser, etc ..
Also, drop your parameters.yml and your PHP version.

@Asara
Copy link
Author

Asara commented Feb 12, 2016

First command:

[root@wallabag /usr/local/www/apache24]# SYMFONY_ENV=prod php -d memory_limit=-1 /usr/local/bin/composer create-project wallabag/wallabag wallabag "2.x-dev" --no-dev

Fill out the information, seems to install with no problem.

[root@wallabag /usr/local/www/apache24]# cd wallabag
[root@wallabag /usr/local/www/apache24/wallabag]# php bin/console --env=prod wallabag:install
Step 1 of 4. Checking system requirements.                                      
+---------+--------+----------------+                                           
| Checked | Status | Recommendation |                                           
+---------+--------+----------------+                                           
| PCRE    | OK!    |                |                                           
| DOM     | OK!    |                |                                                                                                                                                                           
+---------+--------+----------------+                                           
Success! Your system can run Wallabag properly.                                 

Step 2 of 4. Setting up database.                                               
It appears that your database already exists. Would you like to reset it? (y/N)N
Seems like your database contains schema. Do you want to reset it? (y/N)y       
Droping schema and creating schema                                              
Clearing the cache                                                              

Step 3 of 4. Administration setup.                                              
Would you like to create a new user ? (y/N)y                                    
Username (default: wallabag) :root                                              
Password (default: wallabag) :password                                          
Email:                                                                          

Step 4 of 4. Installing assets.                                                 

Wallabag has been successfully installed.                                       
Just execute `php bin/console server:run` for using wallabag: http://localhost:8000
[root@wallabag /usr/local/www/apache24/wallabag]# php bin/console --env=prod server:run


 [ERROR] Running PHP built-in server in production environment is NOT recommended!                                      



 [OK] Server running on http://127.0.0.1:8000                                                                           


 // Quit the server with CONTROL-C.

After this, in the browser make a new user. When you log in the first time everything is fine. logging out and logging back in as the new user causes #1608 (comment)

Adding a new article causes: #1608 (comment)
PHP Version:

[root@wallabag /usr/local/www/apache24/wallabag]# php --version
PHP 5.6.17 (cli) (built: Jan 12 2016 01:31:33) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

For parameters I only added the pocket id at the end

# This file is auto-generated during the composer install
parameters:
    database_driver: pdo_mysql
    database_host: 10.1.1.15
    database_port: 3306
    database_name: wallabag
    database_user: wallabag
    database_password: wallabagdbPassword
    database_path: '%kernel.root_dir%/../data/db/wallabag.sqlite'
    database_table_prefix: wallabag_
    test_database_driver: pdo_sqlite
    test_database_host: 127.0.0.1
    test_database_port: null
    test_database_name: null
    test_database_user: null
    test_database_password: null
    test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite'
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    locale: en_US.UTF-8
    secret: THISISASECRETGODDAMNIT
    twofactor_auth: false
    twofactor_sender: no-reply@wallabag.org
    fosuser_confirmation: false
    from_email: no-reply@wallabag.org
    pocket_consumer_id: 'MYCONSUMERID'

@j0k3r
Copy link
Member

j0k3r commented Feb 12, 2016

Everything looks normal.. Did you get any errors during the first command?

locale: en_US.UTF-8

Could you try by just setting en instead?

@Asara
Copy link
Author

Asara commented Feb 12, 2016

Same issues when using just en.

No errors when filling out the install with locale: en_US.UTF-8

@j0k3r
Copy link
Member

j0k3r commented Feb 14, 2016

I'm going out of idea.
Could you list your installed PHP package?

@Asara
Copy link
Author

Asara commented Feb 14, 2016

root@wallabag:~ # pkg info | grep php
php-composer-1.0.0.a11_1       Dependency Manager for PHP
php56-5.6.17                   PHP Scripting Language
php56-ctype-5.6.17             The ctype shared extension for php
php56-curl-5.6.17              The curl shared extension for php
php56-dom-5.6.17               The dom shared extension for php
php56-filter-5.6.17            The filter shared extension for php
php56-gd-5.6.17                The gd shared extension for php
php56-gettext-5.6.17           The gettext shared extension for php
php56-hash-5.6.17              The hash shared extension for php
php56-iconv-5.6.17             The iconv shared extension for php
php56-json-5.6.17              The json shared extension for php
php56-mbstring-5.6.17_1        The mbstring shared extension for php
php56-mysql-5.6.17             The mysql shared extension for php
php56-openssl-5.6.17           The openssl shared extension for php
php56-pcntl-5.6.17             The pcntl shared extension for php
php56-pdo-5.6.17               The pdo shared extension for php
php56-pdo_mysql-5.6.17         The pdo_mysql shared extension for php
php56-phar-5.6.17              The phar shared extension for php
php56-posix-5.6.17             The posix shared extension for php
php56-session-5.6.17           The session shared extension for php
php56-simplexml-5.6.17         The simplexml shared extension for php
php56-tidy-5.6.17              The tidy shared extension for php
php56-tokenizer-5.6.17         The tokenizer shared extension for php
php56-xml-5.6.17               The xml shared extension for php
php56-zip-5.6.17               The zip shared extension for php
php56-zlib-5.6.17              The zlib shared extension for php

@tcitworld
Copy link
Member

Even though it isn't the problem since you manage to connect, shouldn't php56-sqlite3 and php56-pdo_sqlite be installed as you're using sqlite ?

@tcitworld
Copy link
Member

Here is the list of the FreeBSD php-related packages from issue #1613 that you don't have :

php56-bz2-5.6.17
php56-exif-5.6.17
php56-fileinfo-5.6.17
php56-pdo_sqlite-5.6.17
php56-sqlite3-5.6.17
php56-wddx-5.6.17
php56-xmlreader-5.6.17
php56-xmlwriter-5.6.17
php56-xsl-5.6.17

Can you try installing some of them if by any luck it changes something ?

@Asara
Copy link
Author

Asara commented Feb 15, 2016

@tcitworld: Thank you man! I wonder which of those dependencies fixed it, but I can now add articles.

Pocket import isn't configured. Your server admin needs to define an API Key for Pocket

Is the only error I still see. I've tried with pocket_consumer_key: 'key' in app/config/paramaters.yml with both single quotes and without any quotes but I still get that error.

@j0k3r
Copy link
Member

j0k3r commented Feb 15, 2016

You need to go on /settings with your admin account and define the key in the Import section.

@Asara
Copy link
Author

Asara commented Feb 15, 2016

@j0k3r Thank you bro!

Wallabag is awesome and you guys are awesomer.

@Asara Asara closed this as completed Feb 15, 2016
@nicosomb
Copy link
Member

❤️

@tcitworld
Copy link
Member

Get a room.

@nicosomb
Copy link
Member

Don't be jealous, please.

@Asara
Copy link
Author

Asara commented Aug 30, 2016

Hey @j0k3r,

Trying to update wallabag but I get the same issue as before (Fatal error: Call to a member function getTaggingRules() on null in /usr/local/www/apache24/wallabag/src/Wallabag/CoreBundle/Helper/RuleBasedTagger.php on line 103)

Using this "2.x-dev" version fixed it last time. Currently tried installing with 2.1.x-dev and 2.0.7 but neither seemed to work.

I checked the dependencies this time and all of them seem to be there (but updated).

Any idea?

@Asara Asara reopened this Aug 30, 2016
@nicosomb nicosomb removed this from the 2.0.0-beta.1 milestone Aug 31, 2016
@nicosomb nicosomb changed the title [v2] Unable to do a fresh install Unable to do a fresh install Aug 31, 2016
@tcitworld
Copy link
Member

I guess config is missing here.

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

Could you told us when you got this error? What is the url? It's mostly to trace the error.
Also, how did you update your wallabag instance? Could you drop us line by line what you did? And from which version of wallabag you are coming from?

@Asara
Copy link
Author

Asara commented Aug 31, 2016

Not really an update, just reinstalled it on the same host.

https://wallabag.domain.tld/new-entry

rm -rf wallabag
SYMFONY_ENV=prod php -d memory_limit=-1 /usr/local/bin/composer create-project wallabag/wallabag wallabag ${VERSION} --no-dev
php bin/console wallabag:install --env=prod
php bin/console server:run --env=prod

Also reset my schema when doing the install

I've tried 2.0.7 as the version, 2.1.x doesn't work since Node.js doesn't support FreeBSD 64bit during composer install

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

What's your app/config/parameters.yml?
What did you put as answer to each question for wallabag:install?

About node it seems you just need pkg install node

@Asara
Copy link
Author

Asara commented Aug 31, 2016

parameters:
    database_driver: pdo_mysql
    database_host: 10.1.1.15
    database_port: 3306
    database_name: wallabag
    database_user: wallabag
    database_password: PASSWORDHERE
    database_path: '%kernel.root_dir%/../data/db/wallabag.sqlite'
    database_table_prefix: wallabag_
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    locale: en
    secret: SECRETHERE
    twofactor_auth: false
    twofactor_sender: no-reply@wallabag.org
    fosuser_confirmation: false
    from_email: no-reply@wallabag.org

I will try 2.1.x-dev after installing node and get back to you

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

Installing node won't fix your problem :)

Could you remove the path to sqlite to : database_path:?

And again:

What did you put as answer to each question for wallabag:install?

@Asara
Copy link
Author

Asara commented Aug 31, 2016

Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
database_driver (pdo_sqlite): pdo_mysql  
database_host (127.0.0.1): 10.1.1.15
database_port (null): 3306
database_name (symfony): wallabag
database_user (root): wallabag
database_password (null): PASSWORDHERE
database_path ('%kernel.root_dir%/../data/db/wallabag.sqlite'): 
database_table_prefix (wallabag_): 
mailer_transport (smtp): 
mailer_host (127.0.0.1): 
mailer_user (null): 
mailer_password (null): 
locale (en): 
secret (ovmpmAWXRCabNlMgzlzFXDYmCFfzGv): SECRETHERE
twofactor_auth (true): false
twofactor_sender (no-reply@wallabag.org): 
fosuser_confirmation (true): false
from_email (no-reply@wallabag.org):`

removing the path in database_path didn't help either.

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

What did you put as answer to each question for wallabag:install?

@Asara
Copy link
Author

Asara commented Aug 31, 2016

Ah sorry.

Installing Wallabag...

Step 1 of 5. Checking system requirements.
+-----------------+--------+----------------+
| Checked         | Status | Recommendation |
+-----------------+--------+----------------+
| PDO Driver      | OK!    |                |
| curl_exec       | OK!    |                |
| curl_multi_init | OK!    |                |
+-----------------+--------+----------------+
Success! Your system can run Wallabag properly.

Step 2 of 5. Setting up database.
It appears that your database already exists. Would you like to reset it? (y/N)N
Seems like your database contains schema. Do you want to reset it? (y/N)y
Droping schema and creating schema
Clearing the cache

Step 3 of 5. Administration setup.
Would you like to create a new admin user (recommended) ? (Y/n)
Username (default: wallabag) :root
Password (default: wallabag) :password
Email:

Step 4 of 5. Config setup.

Step 5 of 5. Installing assets.

Wallabag has been successfully installed.
Just execute `php bin/console server:run --env=prod` for using wallabag: http://localhost:8000

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

And now if you connect with the user root you got the previous error about getTaggingRules, right?

@Asara
Copy link
Author

Asara commented Aug 31, 2016

Hm. No. Only when I create a new user (using registration) and then add something as the new user.

@j0k3r
Copy link
Member

j0k3r commented Aug 31, 2016

Ha interesting.

@j0k3r
Copy link
Member

j0k3r commented Oct 3, 2016

Should be fixed in the 2.1.
There were a bug on the registration.

@j0k3r j0k3r closed this as completed Oct 3, 2016
@j0k3r j0k3r added this to the 2.1.0 milestone Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants