Home Forums Support Android app doesn't pull all information

This topic contains 17 replies, has 2 voices, and was last updated by  Toesieo 5 months, 1 week ago.

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #17412

    Toesieo
    Participant

    Hello,

    I operate a self hosted white labeled instance of Invoice Ninja version 4.5.6. I am experiencing something strange with my Android app. It connects to my site fine and I can look up clients and contact information along with some other information but the first 2 widgets are always loading (see link 1) and if I try to view an invoice i get the red error screen seen in link 2.

    link 1: https://imgur.com/TL7NQUh
    link 2: https://imgur.com/a/wcepd5I

    The last couple of entries on my laravel-error log are are follows. IPs and names ReDaCtEd.

    ******
    object {“context”:”PHP”,”user_id”:1,”account_id”:”1″,”user_name”:”ReDaCtEd”,”method”:”GET”,”user_agent”:”Dart/2.1 (dart:io)”,”locale”:”en”,”ip”:”ReDaCtEd”,”count”:1,”is_console”:”no”,”is_api”:”yes”,”db_server”:”mysql”,”url”:”api/v1/invoices”} []
    [2018-12-11 14:33:01] production.ERROR: ***ErrorException*** [0] : /home4/ReDaCtEd/public_html/inv/app/Ninja/Transformers/InvoiceTransformer.php [Line 93] => Trying to get property of non-object {“context”:”PHP”,”user_id”:1,”account_id”:”1″,”user_name”:”ReDaCtEd”,”method”:”GET”,”user_agent”:”Dart/2.1 (dart:io)”,”locale”:”en”,”ip”:”ReDaCtEd”,”count”:1,”is_console”:”no”,”is_api”:”yes”,”db_server”:”mysql”,”url”:”api/v1/invoices”} []
    [2018-12-11 18:11:57] production.ERROR: ***ErrorException*** [0] : /home4/ReDaCtEd/public_html/inv/app/Ninja/Transformers/InvoiceTransformer.php [Line 93] => Trying to get property of non-object {“context”:”PHP”,”user_id”:1,”account_id”:”1″,”user_name”:”ReDaCtEd”,”method”:”GET”,”user_agent”:”Dart/2.1 (dart:io)”,”locale”:”en”,”ip”:”ReDaCtEd”,”count”:1,”is_console”:”no”,”is_api”:”yes”,”db_server”:”mysql”,”url”:”api/v1/invoices”} []
    [2018-12-11 18:12:16] production.ERROR: ***ErrorException*** [0] : /home4/ReDaCtEd/public_html/inv/app/Ninja/Transformers/InvoiceTransformer.php [Line 93] => Trying to get property of non-object {“context”:”PHP”,”user_id”:1,”account_id”:”1″,”user_name”:”ReDaCtEd”,”method”:”GET”,”user_agent”:”Dart/2.1 (dart:io)”,”locale”:”en”,”ip”:”ReDaCtEd”,”count”:1,”is_console”:”no”,”is_api”:”yes”,”db_server”:”mysql”,”url”:”api/v1/invoices”} []

    ******

    #17414

    Hillel Coren
    Keymaster

    Has any data been manually deleted from the database?

    #17415

    Toesieo
    Participant

    I don’t believe so.

    #17416

    Hillel Coren
    Keymaster

    Try running this SQL query, any invoices listed have had their associated client deleted.

    select invoice_number
    from invoices i
    left join clients c on c.id = i.client_id
    where c.id is null;

    #17417

    Toesieo
    Participant

    Yup, I got 3 records returned.
    INV0035
    INV0040
    INV0046

    #17418

    Hillel Coren
    Keymaster

    I’m not sure how but it looks like the clients have been deleted.

    #17419

    Toesieo
    Participant

    Hmmm, is there a way I could fix this or am I doomed.

    #17420

    Hillel Coren
    Keymaster

    To fix the mobile app you could either try to recreate the missing clients or delete the invoices.

    #17421

    Toesieo
    Participant

    The invoices are old and are from before I change the invoice numbering scheme. I will delete the invoices. Do I to this manually?

    #17422

    Hillel Coren
    Keymaster

    You’d need to delete them in the database, I’d suggest making a backup first.

    #17423

    Toesieo
    Participant

    Thanks Hillel, I will give that a try.

    #17424

    Toesieo
    Participant

    That made a difference. Invoices open and the red error screen is gone. However the 2nd widget on the dashboard doesn’t load and so does ‘Payments’ they just keep spinning.

    #17428

    Toesieo
    Participant

    New error in laravel-error log
    ******
    [2018-12-11 21:43:58] production.ERROR: ***ErrorException*** [0] : /home4/ReDaCtEd/public_html/inv/app/Ninja/Transformers/PaymentTransformer.php [Line 66] => Trying to get property of non-object {“context”:”PHP”,”user_id”:1,”account_id”:”1″,”user_name”:”ReDaCtEd”,”method”:”GET”,”user_agent”:”Dart/2.1 (dart:io)”,”locale”:”en”,”ip”:”ReDaCtEd”,”count”:1,”is_console”:”no”,”is_api”:”yes”,”db_server”:”mysql”,”url”:”api/v1/payments”} []
    ******

    #17435

    Hillel Coren
    Keymaster

    It looks like you also need to delete the payments associated with the invoices.

    #17471

    Toesieo
    Participant

    Good day Hillel, how do I locate these payments? I don’t see a dedicated payments table.

    #17472

    Toesieo
    Participant

    I fixed it. Was able to run a query that identified the payment and the missing client, backed up the db and deleted the entry. The mobile app seems to fully work now. All widgets generate and no red error screens so far. Thanks for all the help again.

    #17473

    Hillel Coren
    Keymaster

    Glad to hear it! If you’d consider leaving a review for the app we’d greatly appreciate it.

    #17474

    Toesieo
    Participant

    Sure, will do. 👍

Viewing 18 posts - 1 through 18 (of 18 total)

You must be logged in to reply to this topic.

Posted in: