fayaz
November 30, 2020, 11:50am
21
@david
We have now upgraded to the latest release (V5.0.31) but still same thing with migrations. Logs on v5 now appears to be something different but migration is not working yet
V5.0.31 Logs
[2020-11-30 11:14:48] production.INFO: reminder 1 subject
[2020-11-30 11:19:51] production.INFO: migrations/3hacmvotbe94aayr3jnwwut4gfoxhinn-2020-11-30-invoiceninja.zip
[2020-11-30 12:00:03] production.INFO: Sending recurring invoices 2020-11-30 12:00:02
We have even tried force migration option but no luck.
david
November 30, 2020, 8:18pm
22
Are your queues running and/or have you setup the scheduler cron?
fayaz
November 30, 2020, 8:55pm
23
@david
Yes , we have below in our cron running every minute
cd /path-to-our-project && php artisan schedule:run >> /dev/null 2>&1
david
November 30, 2020, 11:28pm
24
Can you try running
php artisan queue:restart
fayaz
December 1, 2020, 11:37am
25
@david
Tried this as well and started migration and below are new logs for V5
[2020-12-01 10:55:39] production.INFO: Importing company
[2020-12-01 10:55:40] production.INFO: Importing users
[2020-12-01 10:55:40] production.INFO: Importing payment_terms
[2020-12-01 10:55:40] production.INFO: Importing tax_rates
[2020-12-01 10:55:40] production.INFO: Importing clients
But now when i try to login to V5 , it gives following error
NoSuchMethodError: method not found: ‘a’ on null
Hence unable to login
ben
December 1, 2020, 11:47am
26
All right, that looks good, from the logs side.
@hillel , do you maybe know what could be wrong on Flutter side?
hillel
December 1, 2020, 12:02pm
27
Can you try logging in with the mobile or desktop apps, it should provide a clearer error.
fayaz
December 1, 2020, 12:18pm
28
@hillel
Below is error when trying from mobile app
HandshakeException: Handshake error in client (OS Error): CERTIFICATE_VERIFY_FAILED:
Hostname mismatch (handshake.cc:354)
hillel
December 1, 2020, 12:20pm
29
Thanks! Are you using a self signed certificate? Using Let’s Encrypt should fix it.
hillel
December 1, 2020, 12:20pm
30
Note: I think these are two separate issues.
fayaz
December 1, 2020, 12:21pm
31
Okay, will try and let you know. thanks
fayaz
December 1, 2020, 7:55pm
32
@hillel and @david
I have installed letsencrypt and now error is change. I am getting the following error
david
December 1, 2020, 8:53pm
33
@fayaz is this after migration?
fayaz
December 1, 2020, 8:54pm
34
Yes. I see the data in the database but get above error when trying to login to V5
david
December 1, 2020, 8:57pm
35
As a test, are you able to comment out line 68 in app/Http/Controllers/BaseController.php
'company.users`
fayaz
December 1, 2020, 9:14pm
36
@david
I have tried above but still there is same error message
fayaz
December 2, 2020, 4:00am
37
and this is what i see in my V4 logs which appears to be relevant with V5 error above
[2020-12-02 03:56:59] production.ERROR: ErrorException [0]
/app/Http/Controllers/Migration/StepsController.php [Line 216] => Undefined index: id {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“Super Administrator”,“method”:“POST”,“user_agent”:“Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36”,“locale”:“en”,“ip”:“39.44.230.28”,“count”:5,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“migration/companies”} []
fayaz
December 2, 2020, 1:56pm
38
@david and @hillel ,
any updates please ? I see manually from the database that data is there now but i am unable to login and it shows same below error
david
December 2, 2020, 9:22pm
39
@fayaz
This one is a real puzzle. I am not sure why that query is reading like that, it seems to be missing the id key.
could you try another thing for me, please change Line 90 of app\Models\CompanyUser.php to this please
return $this->hasMany(User::class, 'id', 'user_id');
fayaz
December 4, 2020, 8:12am
40
@david
This one did not work too and I am now getting a different error as below