Comments (7)
The code throwing the issue has been changed in the latest version and at least for us the version ^5.9.2
seems to work on iOS
from capacitor-updater.
I've been experiencing the same issue since yesterday. I updated from ^5.3.48 to ^5.7.17. I'll try downgrading.
from capacitor-updater.
Downgrading the plugin version to 5.6.13 worked for me..
which was kinda strange
from capacitor-updater.
Downgrading the plugin version to 5.6.13 worked for me..
which was kinda strange
Using 5.6.13 but having same issue. Issue is on iOS, working in Android.
✨ Capacitor-updater: Stats sent for download_60, version 24.3.2
✨ Capacitor-updater: Cannot found privateKey or sessionKey
Simultaneous accesses to 0x600002c44a90, but modification requires exclusive access.
Previous access (a modification) started at ⚡️ TO JS
I'm using auto update from my server.
from capacitor-updater.
Below is full log that may be helpful in debugging:
✨ Capacitor-updater: Check for pending update
✨ Capacitor-updater: Stats sent for app_moved_to_background, version builtin
⚡️ [log] - Application pause
⚡️ TO JS undefined
✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady
✨ Capacitor-updater: Check for update via https://ws1.wealthspectrum.com/wealthspectrum/app/mobile/checkForUpdate
✨ Capacitor-updater: Auto-update parameters: InfoObject(platform: Optional("ios"), device_id: Optional("92FDB34A-3D6B-4695-8F06-926F5B4E2BED"), app_id: Optional("com.wealthspectrum.wealth.portal"), custom_id: Optional(""), version_build: Optional("24.3"), version_code: Optional("9"), version_os: Optional("17.0.1"), version_name: Optional("builtin"), plugin_version: Optional("5.7.14"), is_emulator: Optional(true), is_prod: Optional(false), action: nil, channel: nil, defaultChannel: Optional(""))
⚡️ [log] - Application resumed : 1711634133899
⚡️ [log] - vault kept unlocked
✨ Capacitor-updater: Stats sent for app_moved_to_foreground, version builtin
✨ Capacitor-updater: New bundle: 24.3.2 found. Current is: builtin. Update will occur next time app moves to background.
✨ Capacitor-updater: list File : /Users/appliedm1/Library/Developer/CoreSimulator/Devices/2FC07F16-5D1D-4461-B417-9E742CFF46E5/data/Containers/Data/Application/75163DDB-5940-4142-BA31-410B92BA2A8D/Documents/versions
✨ Capacitor-updater: Storing info for bundle [0Ur9YqzhTw] { "id": "0Ur9YqzhTw", "version": "24.3.2", "downloaded": "2024-03-28T13:55:42.480Z", "checksum": "", "status": "downloading"}
✨ Capacitor-updater: Stats sent for download_0, version 24.3.2
✨ Capacitor-updater: Stats sent for download_10, version 24.3.2
✨ Capacitor-updater: Stats sent for download_10, version 24.3.2
✨ Capacitor-updater: Stats sent for download_20, version 24.3.2
✨ Capacitor-updater: Stats sent for download_20, version 24.3.2
✨ Capacitor-updater: Stats sent for download_30, version 24.3.2
✨ Capacitor-updater: Stats sent for download_40, version 24.3.2
✨ Capacitor-updater: Stats sent for download_40, version 24.3.2
✨ Capacitor-updater: Stats sent for download_50, version 24.3.2
✨ Capacitor-updater: Stats sent for download_50, version 24.3.2
✨ Capacitor-updater: Cannot found privateKey or sessionKey
✨ Capacitor-updater: Stats sent for download_60, version 24.3.2
Simultaneous accesses to 0x600000bd55d0, but modification requires exclusive access.
Previous access (a modification) started at CapgoCapacitorUpdater`CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 1544 (0x1064255e4).
Current access (a modification) started at:
0 libswiftCore.dylib 0x0000000107b8117c swift::runtime::AccessSet::insert(swift::runtime::Access*, void*, void*, swift::ExclusivityFlags) + 428
1 libswiftCore.dylib 0x0000000107b81390 swift_beginAccess + 72
2 CapgoCapacitorUpdater 0x0000000106425c6c closure #1 in CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 284
3 CapgoCapacitorUpdater 0x000000010643df30 partial apply for closure #1 in CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 156
4 CapgoCapacitorUpdater 0x0000000106425ddc thunk for @escaping @callee_guaranteed (@guaranteed String, @unowned unz_file_info_s, @unowned Int, @unowned Int) -> () + 224
5 SSZipArchive 0x0000000105f4aebc +[SSZipArchive unzipFileAtPath:toDestination:preserveAttributes:overwrite:nestedZipLevel:password:error:delegate:progressHandler:completionHandler:] + 7020
6 CapgoCapacitorUpdater 0x0000000106424fdc CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 1660
7 CapgoCapacitorUpdater 0x0000000106429d34 closure #3 in CapacitorUpdater.download(url:version:sessionKey:) + 1596
8 CapgoCapacitorUpdater 0x000000010642aea4 partial apply for closure #3 in CapacitorUpdater.download(url:version:sessionKey:) + 72
9 Alamofire 0x00000001060194e0 closure #1 in closure #1 in closure #3 in closure #1 in DownloadRequest._response(queue:responseSerializer:completionHandler:) + 124
10 Alamofire 0x0000000105fb0228 thunk for @escaping @callee_guaranteed @sendable () -> () + 48
11 libdispatch.dylib 0x00000001081fc0d8 _dispatch_call_block_and_release + 24
12 libdispatch.dylib 0x00000001081fd92c _dispatch_client_callout + 16
13 libdispatch.dylib 0x0000000108211348 _dispatch_root_queue_drain + 940
14 libdispatch.dylib 0x0000000108211f68 _dispatch_worker_thread2 + 256
15 libsystem_pthread.dylib 0x0000000108d2b808 _pthread_wqthread + 224
16 libsystem_pthread.dylib 0x0000000108d2a6dc start_wqthread + 8
from capacitor-updater.
Below is full log that may be helpful in debugging:
✨ Capacitor-updater: Check for pending update ✨ Capacitor-updater: Stats sent for app_moved_to_background, version builtin ⚡️ [log] - Application pause ⚡️ TO JS undefined ✨ Capacitor-updater: Wait for 10000 ms, then check for notifyAppReady ✨ Capacitor-updater: Check for update via https://ws1.wealthspectrum.com/wealthspectrum/app/mobile/checkForUpdate ✨ Capacitor-updater: Auto-update parameters: InfoObject(platform: Optional("ios"), device_id: Optional("92FDB34A-3D6B-4695-8F06-926F5B4E2BED"), app_id: Optional("com.wealthspectrum.wealth.portal"), custom_id: Optional(""), version_build: Optional("24.3"), version_code: Optional("9"), version_os: Optional("17.0.1"), version_name: Optional("builtin"), plugin_version: Optional("5.7.14"), is_emulator: Optional(true), is_prod: Optional(false), action: nil, channel: nil, defaultChannel: Optional("")) ⚡️ [log] - Application resumed : 1711634133899 ⚡️ [log] - vault kept unlocked ✨ Capacitor-updater: Stats sent for app_moved_to_foreground, version builtin ✨ Capacitor-updater: New bundle: 24.3.2 found. Current is: builtin. Update will occur next time app moves to background. ✨ Capacitor-updater: list File : /Users/appliedm1/Library/Developer/CoreSimulator/Devices/2FC07F16-5D1D-4461-B417-9E742CFF46E5/data/Containers/Data/Application/75163DDB-5940-4142-BA31-410B92BA2A8D/Documents/versions ✨ Capacitor-updater: Storing info for bundle [0Ur9YqzhTw] { "id": "0Ur9YqzhTw", "version": "24.3.2", "downloaded": "2024-03-28T13:55:42.480Z", "checksum": "", "status": "downloading"} ✨ Capacitor-updater: Stats sent for download_0, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_10, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_10, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_20, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_20, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_30, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_40, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_40, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_50, version 24.3.2 ✨ Capacitor-updater: Stats sent for download_50, version 24.3.2 ✨ Capacitor-updater: Cannot found privateKey or sessionKey ✨ Capacitor-updater: Stats sent for download_60, version 24.3.2 Simultaneous accesses to 0x600000bd55d0, but modification requires exclusive access. Previous access (a modification) started at CapgoCapacitorUpdater`CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 1544 (0x1064255e4). Current access (a modification) started at: 0 libswiftCore.dylib 0x0000000107b8117c swift::runtime::AccessSet::insert(swift::runtime::Access*, void*, void*, swift::ExclusivityFlags) + 428 1 libswiftCore.dylib 0x0000000107b81390 swift_beginAccess + 72 2 CapgoCapacitorUpdater 0x0000000106425c6c closure #1 in CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 284 3 CapgoCapacitorUpdater 0x000000010643df30 partial apply for closure #1 in CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 156 4 CapgoCapacitorUpdater 0x0000000106425ddc thunk for @escaping @callee_guaranteed (@guaranteed String, @unowned unz_file_info_s, @unowned Int, @unowned Int) -> () + 224 5 SSZipArchive 0x0000000105f4aebc +[SSZipArchive unzipFileAtPath:toDestination:preserveAttributes:overwrite:nestedZipLevel:password:error:delegate:progressHandler:completionHandler:] + 7020 6 CapgoCapacitorUpdater 0x0000000106424fdc CapacitorUpdater.saveDownloaded(sourceZip:id:base:) + 1660 7 CapgoCapacitorUpdater 0x0000000106429d34 closure #3 in CapacitorUpdater.download(url:version:sessionKey:) + 1596 8 CapgoCapacitorUpdater 0x000000010642aea4 partial apply for closure #3 in CapacitorUpdater.download(url:version:sessionKey:) + 72 9 Alamofire 0x00000001060194e0 closure #1 in closure #1 in closure #3 in closure #1 in DownloadRequest._response(queue:responseSerializer:completionHandler:) + 124 10 Alamofire 0x0000000105fb0228 thunk for @escaping @callee_guaranteed @sendable () -> () + 48 11 libdispatch.dylib 0x00000001081fc0d8 _dispatch_call_block_and_release + 24 12 libdispatch.dylib 0x00000001081fd92c _dispatch_client_callout + 16 13 libdispatch.dylib 0x0000000108211348 _dispatch_root_queue_drain + 940 14 libdispatch.dylib 0x0000000108211f68 _dispatch_worker_thread2 + 256 15 libsystem_pthread.dylib 0x0000000108d2b808 _pthread_wqthread + 224 16 libsystem_pthread.dylib 0x0000000108d2a6dc start_wqthread + 8
Found this is working fine on latest version.
from capacitor-updater.
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/memorysafety/
Example to avoid call twins
It works for me but i don't know any side-effect to change like this.
private func saveDownloaded(sourceZip: URL, id: String, base: URL) throws {
.....
DispatchQueue.main.async {
var unzipError1 = unzipError
self.unzipProgressHandler(entry: entry, zipInfo: zipInfo, entryNumber: entryNumber, total: total, destUnZip: destUnZip, id: id, newUnzipError: &unzipError1)
}
......
}
private func unzipProgressHandler(entry: String, zipInfo: unz_file_info, entryNumber: Int, total: Int, destUnZip: URL, id: String, newUnzipError: inout NSError?) {
and change unzipError to newUnzipError
Find SSZipArchive
- (BOOL)unzipFileAtPath:(NSString *)path
toDestination:(NSString *)destination
preserveAttributes:(BOOL)preserveAttributes
overwrite:(BOOL)overwrite
nestedZipLevel:(NSInteger)nestedZipLevel
password:(nullable NSString *)password
error:(NSError **)error
delegate:(nullable id)delegate
progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler1
completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler
......
if (progressHandler1)
{
progressHandler1(strPath, fileInfo, currentFileNumber, globalInfo.number_entry);
}
}
} while (ret == UNZ_OK && success);
// Close
unzClose(zip);
........
from capacitor-updater.
Related Issues (20)
- feat: Support React native HOT 31
- iOS reviewers wanted for partial update PRs HOT 24
- feat: Check for updates periodically when app is open HOT 6
- bug: failed download because of checksum HOT 4
- feat: disable stats HOT 4
- bug: Fatal error: appId is empty HOT 27
- bug: getLatest returning old data HOT 1
- bug: Crash android 14 HOT 5
- feat: Load other pages as default instead of `index.html`
- feat: allow update endpoint to return custom json data object HOT 2
- feat: set channel in capacitor config HOT 4
- bug: After i update using download method ...the version didn't updated...it still remains in previous version HOT 1
- feat: dynamic download URL configuration HOT 3
- feat: ability to update your app on first start HOT 7
- bug: Race condition in backgroundDownload() HOT 1
- bug: Updated bundle scripts does not run (index.js does not exists, there is no such file) HOT 1
- it wont update the app it keep show unknown version
- feat: Capacitor 6 Support HOT 5
- bug: IOS bundle resets after closing app. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-updater.