View PDF not opening/loading using App method, website method works

Using App from microsoft store, view pdf - just getting spinning circle
Using Website way view pdf opens within a few seconds.

Hi,

I’m not sure, since the PDF is generated in the backend I wouldn’t expect there to be a difference. Are there any errors in storage/logs?

Only… IP address in url wont work for anybody

[2023-01-16 07:58:07] production.ERROR: Error retrieving credentials from the instance profile metadata service. (cURL error 28: Connection timed out after 1001 milliseconds (see libcurl - Error Codes) for http://169.254.169.254/latest/meta-data/iam/security-credentials/) {“exception”:"[object] (Aws\Exception\CredentialsException(code: 0): Error retrieving credentials from the instance profile metadata service. (cURL error 28: Connection timed out after 1001 milliseconds (see libcurl - Error Codes) for http://169.254.169.254/latest/meta-data/iam/security-credentials/) at /var/www/invoiceninja/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php:264)

Do you see more of these errors appear when attempting to view the PDF in the app?

Invoice will show after toggling “Delivery Note” check box, then appears within a few seconds.
Sometimes invoice dissapears when unchecking “Delivery Note”, and busy circle comes back.

Do you see more of errors above appear when attempting to view the PDF in the app?

It would help know if the error is related to the problem.

no errors appearing on screen.

Understood. Above you shared an error which was appearing in the error logs, my question is do more of these errors appear in the log when viewing the PDF?

no, iIdeleted the log file, and it hasn’t made a new one, when viewing pdf from web or app way.

I’ve reviewed the code, if the PDF fails we aren’t currently showing the error in the UI. I’ve corrected this, please try again when the next release of the desktop app is available.

1 Like

Error looks to be every 8-10 seconds

[2023-02-02 11:53:19] production.ERROR: Error retrieving credentials from the instance profile metadata service. (cURL error 28: Connection timed out after 1002 milliseconds (see libcurl - Error Codes) for http://169.254.169.254/latest/meta-data/iam/security-credentials/) {“exception”:"[object] (Aws\Exception\CredentialsException(code: 0): Error retrieving credentials from the instance profile metadata service. (cURL error 28: Connection timed out after 1002 milliseconds (see libcurl - Error Codes) for http://169.254.169.254/latest/meta-data/iam/security-credentials/) at /var/www/invoiceninja/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php:264)
[stacktrace]
#0 /var/www/invoiceninja/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(139): Aws\Credentials\InstanceProfileProvider->handleRetryableException()
#1 [internal function]: Aws\Credentials\InstanceProfileProvider->Aws\Credentials\{closure}()
#2 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Coroutine.php(160): Generator->throw()
#3 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Promise\Coroutine->_handleFailure()
#4 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#5 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#6 /var/www/invoiceninja/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(159): GuzzleHttp\Promise\TaskQueue->run()
#7 /var/www/invoiceninja/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(184): GuzzleHttp\Handler\CurlMultiHandler->tick()
#8 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Handler\CurlMultiHandler->execute()
#9 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#10 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#11 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#12 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#13 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Coroutine.php(67): GuzzleHttp\Promise\Promise->wait()
#14 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\Coroutine->GuzzleHttp\Promise\{closure}()
#15 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#16 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#17 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Coroutine.php(103): GuzzleHttp\Promise\Promise->wait()
#18 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(274): GuzzleHttp\Promise\Coroutine->wait()
#19 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#20 /var/www/invoiceninja/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#21 /var/www/invoiceninja/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()
#22 /var/www/invoiceninja/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(86): Aws\AwsClient->execute()
#23 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php(172): Aws\AwsClient->__call()
#24 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(342): Illuminate\Queue\SqsQueue->pop()
#25 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(351): Illuminate\Queue\Worker->Illuminate\Queue\{closure}()
#26 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(160): Illuminate\Queue\Worker->getNextJob()
#27 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(147): Illuminate\Queue\Worker->daemon()
#28 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\Queue\Console\WorkCommand->runWorker()
#29 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#30 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#31 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#32 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#33 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(663): Illuminate\Container\BoundMethod::call()
#34 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call()
#35 /var/www/invoiceninja/vendor/symfony/console/Command/Command.php(312): Illuminate\Console\Command->execute()
#36 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\Component\Console\Command\Command->run()
#37 /var/www/invoiceninja/vendor/symfony/console/Application.php(1022): Illuminate\Console\Command->run()
#38 /var/www/invoiceninja/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#39 /var/www/invoiceninja/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#40 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#41 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\Console\Application->run()
#42 /var/www/invoiceninja/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#43 {main}
"}

@david any thoughts on the error?

I’ve seen this when people try to run queue’s on amazon sqs?

the system is trying to authenticate with aws.

As already stated the url is wrong.
any server running this url as above " http://169.254.169.254/latest/meta-data/iam/security-credentials" wont work as 169.254.169.254 is a default microsoft non dhcp issued ip / internal ip address. so any server trying to access this site wont get a response and time out.

can it be disabled, as creating large log files quickly.