zcash-android-wallet-sdk icon indicating copy to clipboard operation
zcash-android-wallet-sdk copied to clipboard

Consider No space left on device error message

Open HonzaR opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Once the Synchornizer runs into trouble of no free space left on the device it returns this error message to its status field: FailedDownload: Error while downloading blocks. This most likely means the server is down or slow to respond. See logs for details.

We could consider returning an error, which would be a bit more storage related, and thus self explaining.

Screenshot from Secant wallet failing sync due to not enough free space:

Additional context

Stactktrace:

DefaultDispatcher-worker-6     CompactBlockProcessor.invokeSuspend(): downloaded BlockHeight(value=664951)..BlockHeight(value=664960) (batch 2 of 160296) [BlockHeight(value=664951)..BlockHeight(value=664960)]                                                                                   
DefaultDispatcher-worker-6     CompactBlockProcessor.invokeSuspend(): Retrying (5/5) in 8000s...                                                                                                                                                                                                   
java.io.IOException: No space left on device                                                                                                                                                                                                                                                                                   
	at java.io.UnixFileSystem.createFileExclusively0(Native Method)                                                                                                                                                                                                                                                            
	at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)                                                                                                                                                                                                                                                   
	at java.io.File.createNewFile(File.java:1006)                                                                                                                                                                                                                                                                              
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invokeSuspend(FileExt.kt:28)                                                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invoke(Unknown Source:8)                                                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invoke(Unknown Source:4)                                                                                                                                                                                                                           
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)                                                                                                                                                                                                                              
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)                                                                                                                                                                                                                                    
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)                                                                                                                                                                                                                                                             
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt.createNewFileSuspend(FileExt.kt:28)                                                                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.storage.block.FileCompactBlockRepositoryKt.createTemporaryFile(FileCompactBlockRepository.kt:151)                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.storage.block.FileCompactBlockRepository.write(FileCompactBlockRepository.kt:35)                                                                                                                                                                                                        
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invokeSuspend(CompactBlockDownloader.kt:50)                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invoke(Unknown Source:8)                                                                                                                                                                                                              
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invoke(Unknown Source:4)                                                                                                                                                                                                              
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)                                                                                                                                                                                                                              
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)                                                                                                                                                                                                                                    
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)                                                                                                                                                                                                                                                             
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader.downloadBlockRange(CompactBlockDownloader.kt:46)                                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.block.CompactBlockProcessor$downloadNewBlocks$2.invokeSuspend(CompactBlockProcessor.kt:680)                                                                                                                                                                                                      
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                                                                                                                                                                                                                                  
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)                                                                                                                                                                                                                                                            
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)                                                                                                                                                                                                                                              
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)                                                                                                                                                                                                                                                                 
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)                                                                                                                                                                                                                                   
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)                                                                                                                                                                                                                          
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)                                                                                                                                                                                                                            
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)                                                                                                                                                                                                                                  
DefaultDispatcher-worker-6     CompactBlockProcessor.invokeSuspend(): downloaded BlockHeight(value=664951)..BlockHeight(value=664960) (batch 2 of 160296) [BlockHeight(value=664951)..BlockHeight(value=664960)]                                                                                   
DefaultDispatcher-worker-6     SdkSynchronizer.onProcessorError(): ERROR while processing data: cash.z.ecc.android.sdk.exception.CompactBlockProcessorException$FailedDownload: Error while downloading blocks. This most likely means the server is down or slow to respond. See logs for details.
co.electriccoin.zcash.testnet.debug DefaultDispatcher-worker-6     WalletViewModel.invoke(): WALLET - Error Processor: cash.z.ecc.android.sdk.exception.CompactBlockProcessorException$FailedDownload: Error while downloading blocks. This most likely means the server is down or slow to respond. See logs for details.     
DefaultDispatcher-worker-6     SdkSynchronizer.onProcessorError(): processor error handler signaled that we should abort!                                                                                                                                                                          
                            main                           SdkSynchronizer.onCriticalError(): Critical error occurred                                                                                                                                                                                                          
cash.z.ecc.android.sdk.exception.CompactBlockProcessorException$FailedDownload: Error while downloading blocks. This most likely means the server is down or slow to respond. See logs for details.                                                                                                                            
	at cash.z.ecc.android.sdk.block.CompactBlockProcessor$downloadNewBlocks$2.invokeSuspend(CompactBlockProcessor.kt:667)                                                                                                                                                                                                      
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                                                                                                                                                                                                                                  
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)                                                                                                                                                                                                                                                            
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)                                                                                                                                                                                                                                              
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)                                                                                                                                                                                                                                                                 
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)                                                                                                                                                                                                                                   
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)                                                                                                                                                                                                                          
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)                                                                                                                                                                                                                            
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)                                                                                                                                                                                                                                  
Caused by: java.io.IOException: No space left on device                                                                                                                                                                                                                                                                        
	at java.io.UnixFileSystem.createFileExclusively0(Native Method)                                                                                                                                                                                                                                                            
	at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)                                                                                                                                                                                                                                                   
	at java.io.File.createNewFile(File.java:1006)                                                                                                                                                                                                                                                                              
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invokeSuspend(FileExt.kt:28)                                                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invoke(Unknown Source:8)                                                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt$createNewFileSuspend$2.invoke(Unknown Source:4)                                                                                                                                                                                                                           
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)                                                                                                                                                                                                                              
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)                                                                                                                                                                                                                                    
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)                                                                                                                                                                                                                                                             
	at cash.z.ecc.android.sdk.internal.ext.FileExtKt.createNewFileSuspend(FileExt.kt:28)                                                                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.storage.block.FileCompactBlockRepositoryKt.createTemporaryFile(FileCompactBlockRepository.kt:151)                                                                                                                                                                                       
	at cash.z.ecc.android.sdk.internal.storage.block.FileCompactBlockRepository.write(FileCompactBlockRepository.kt:35)                                                                                                                                                                                                        
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invokeSuspend(CompactBlockDownloader.kt:50)                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invoke(Unknown Source:8)                                                                                                                                                                                                              
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader$downloadBlockRange$2.invoke(Unknown Source:4)                                                                                                                                                                                                              
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)                                                                                                                                                                                                                              
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)                                                                                                                                                                                                                                    
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)                                                                                                                                                                                                                                                             
	at cash.z.ecc.android.sdk.internal.block.CompactBlockDownloader.downloadBlockRange(CompactBlockDownloader.kt:46)                                                                                                                                                                                                           
	at cash.z.ecc.android.sdk.block.CompactBlockProcessor$downloadNewBlocks$2.invokeSuspend(CompactBlockProcessor.kt:680)                                                                                                                                                                                                      
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)                                                                                                                                                                                                                                  
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)                                                                                                                                                                                                                                                            
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)                                                                                                                                                                                                                                              
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)                                                                                                                                                                                                                                                                 
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)                                                                                                                                                                                                                                   
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)                                                                                                                                                                                                                          
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)                                                                                                                                                                                                                            
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)                                                                                                                                                                                                                                  

HonzaR avatar Mar 17 '23 07:03 HonzaR