StorageException on resuming Firebase upload task through WorkManager - firebase

I'm running a Firebase upload Task through WorkManager. On regular progress updates from UploadTask, I save the session uri in my Shared Preference.
When I switch internet off, Firebase handles the scenario itself and resumes the upload task when internet is turned back on.
But when I power off the phone while firebase is uploading the file and the power on, work manager restarts again and attempts to resume the previous Firebase upload task with last saved session uri and gives the following exception:
E/StorageException: StorageException has occurred.
An unknown error occurred, please check the HTTP result code and inner exception for server response.
Code: -13000 HttpResult: 200
E/StorageException: The server has terminated the upload session
java.io.IOException: The server has terminated the upload session
at com.google.firebase.storage.UploadTask.recoverStatus(com.google.firebase:firebase-storage##16.0.5:354)
at com.google.firebase.storage.UploadTask.run(com.google.firebase:firebase-storage##16.0.5:200)
at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage##16.0.5:1106)
at com.google.firebase.storage.StorageTask$$Lambda$12.run(Unknown Source:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:798)
My session uri is saved whenever I get a progress callback from Firebase Upload Task. Maybe thats the problem that I didn't get the latest one when phone was powering off.
Will appreciate if anyone can help identifying the problem here.

Related

Flutter Firestore Stream closed with status: Status{code=UNAVAILABLE} automatically, Internet is working perfectly

I'm building an app using Flutter and using Firestore as Backend . When I query something to Firestore. It works fine. But after 15-20 mintues when I query again(tapping on button and sending/retrieving data) on Firestore. It shows me the following error shown in picture . When I tap again the query is then send. That means I have to press a button twice, when I'm in AFK(not using Phone or performing any action on Device)
V/NativeCrypto( 4054): Read error: ssl=0xbe39a7c8: I/O error during system call, Connection reset by peer
V/NativeCrypto( 4054): Write error: ssl=0xbe39a7c8: I/O error during system call, Broken pipe
V/NativeCrypto( 4054): SSL shutdown failed: ssl=0xbe39a7c8: I/O error during system call, Success
W/Firestore( 4054): (23.0.3) [WatchStream]: (a4f0ee) Stream closed with status: Status{code=UNAVAILABLE, description=End of stream or IOException, cause=null}.
[cloud_firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff."
The error occurs after 15-20 mintues in the following picture

Debug [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation

I use Flutter, Timer and Firebase/Firestore.batch to do something like this sample code to save data periodically on Mac.
https://github.com/tomoyuki28jp/flutterfire_scheduled_batch_write_sample2
When I run my app for few days, I get this error randomly:
flutter: [cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.
flutter:
#0 MethodChannelWriteBatch.commit
package:cloud_firestore_platform_interface/…/method_channel/method_channel_write_batch.dart:51
<asynchronous suspension>
After hot reloading, it start working again.
Background task keep throwing this error until restarting or reloading my app
While a background task is throwing this error, I can still successfully save firestore data by using my app UI manually.
How can I investigate the cause?
User credentials do expire over time - hot reloading likely re-establishes the Auth session. It is known that Auth needs to be re-established periodically - Firestore is NOT really intended as a permanent connection. Your code needs to be able to respond to changes in Auth state (there is a library function to Listen to Auth events), and respond accordingly - including re-authorizing if that's your intent.

My clone of draw.io fails doGet when authenticating to Google Drive

We have a clone of draw.io. We have made some modifications to the UI for increased functionality. This works on localhost. We then did the Google Drive authentication process. But it was done on version 12.1.7 of draw.io. That integrated with google drive, except when re-opening a previously saved file.[Error with this version discussed here:https://stackoverflow.com/questions/62889536/no-access-control-allow-origin-header-is-present-on-the-requested-resource]
So, we ported our changes to the recent version of draw.io ,version 13.4.5 (https://github.com/jgraph/drawio/releases/tag/v13.4.5). Now, we get a different error. When trying to authenticate <screen shot of pop-up just before error> we get:
Login attempts failed.Please try again later <screenshot of error message>. When we look at developer tools, we see this
HTTP Status 500 - Can't make API call memcache.Set in a thread that is neither the original request thread nor a thread created by ThreadManager
type Exception report
message Can't make API call memcache.Set in a thread that is neither the original request thread nor a thread created by ThreadManager
description The server encountered an internal error that prevented it from fulfilling this request.
exception
com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call memcache.Set in a thread that is neither the original request thread nor a thread created by ThreadManager
com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:800)
com.google.apphosting.api.ApiProxy$1.get(ApiProxy.java:175)
com.google.apphosting.api.ApiProxy$1.get(ApiProxy.java:172)
com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:89)
com.google.appengine.api.memcache.MemcacheServiceImpl.quietGet(MemcacheServiceImpl.java:26)
com.google.appengine.api.memcache.MemcacheServiceImpl.put(MemcacheServiceImpl.java:69)
com.google.appengine.api.memcache.stdimpl.GCache.put(GCache.java:157)
com.mxgraph.online.AbsAuthServlet.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.32 (Ubuntu) logs.
Notice the line in <com.mxgraph.online.AbsAuthServlet>. It says “doGet” is throwing error. I am new to servlets and don’t know how to proceed. I did not find “doGet” in the file AbsAuthServlet.java .
Any help to solve this issue will be great.

Failed to execute supplied script: 04070031 Access Denied

I am new in the Alfresco, and I am developing my first project,
I have a user who is approving some requests, on approval some web scripts are going to execute.
But we are getting below error.
org.activiti.engine.ActivitiException: Exception while invoking TaskListener: Exception while invoking TaskListener: 04070032 Failed to execute the supplied script: 04070031 Access Denied. You do not have the appropriate permissions to perform this operation.
It's more than 2 days since I stuck on this error if anyone has an idea please help.

BizTalk Default Pipeline XML Receive - Error Code -1061153241

Looking in the BizTalk Admin Console under tracked service instances and I can see that the default XML Receive pipeline starts, however it never completes. It remains at status "started" with the error code set to -1061153241. In tracked message events I can see the pipeline receives the message, however i can't see a "send" event type and it looks like the message is not sent to the MessageBox for the waiting orchestration to pick it up. My orchestration never gets initiated. There are no error messages in the event log, no suspended service instances, just the tracked service instance showing starting and not completed with the error code specified above.
I managed to resolve this issue. I had previously just GAC'd a dll and didn't update it as a resource in the Admin Console. Once I updated the Admin Console with this resource and restarted host instances the error went away. Thanks.

Resources