Comments (5)
I am experiencing the same issue.
- contentful.swift version number: 5.5.1
- Xcode version number: 12.5.1 (12E507)
- Target operating system(s) and version number(s)
iOS: 14.5 - Package manager:
Swift Package Manager
I've created a gist with a code sample
from contentful.swift.
Also experiencing the same issue.
from contentful.swift.
Seems that this crash popped up again on Apr 13, might be related to "Issues with the Contentful Web App and Asset rendering"
https://www.contentfulstatus.com/incidents/0rqc2b850qg3
from contentful.swift.
I just encountered this because I've wrapped fetchArray(of
in a Task
and this triggers Fatal error: SWIFT TASK CONTINUATION MISUSE: fetchArray(of:) tried to resume its continuation more than once, throwing Unknown error occured during decoding.!
The issue is in Client.swift
handleJSON<DecodableType: Decodable>
.
If a failure happens on the original decode the failure completion is called but not returned so it continues to a second decoded check that fails and again calls completion(.failure(error)
.
Client.swift:476 and 500
in Contentful 5.5.2
.
from contentful.swift.
I've created a PR with a patch and a suggestion on tackling the reason behind having it called twice.
from contentful.swift.
Related Issues (20)
- Compiler warning in `Field.swift` file HOT 1
- Combine Linked custom types with concrete types HOT 3
- Result ambiguous with Swift.Result HOT 1
- resolveLinksArray returns array of NSNulls HOT 6
- func handleJSON can call two failure completions HOT 1
- Xcode 12 build warnings because Contentful.podspec is still using iOS8
- Including .localizeResults(withLocaleCode:) causes decoding to fail due to keyNotFound HOT 1
- Initial data sync with Contentful in iOS takes more time when compare with Andoid HOT 3
- Api Reference unreachable
- Need to register two or more classes to a single Content Type
- Client is failing to parse Contentful api response HOT 2
- Incremental sync not supported on Preview API
- Contentful API breaks Swift Concurrency by calling completion handlers more than once HOT 4
- Models that conform to Resource and have a member variable named id, breaks resolveLinksArray method
- 1b8b443b61b8b37fafb06c1abad9b6be244c9de9
- The Contentful framework fails to build in XCode Version 14.3.1 HOT 2
- Client.jsonDecoderBuilder is not thread-safe
- import Contentful // Retain the client as a property on a type you define so that // the client's asynchronous network callbacks are executed. let client = Client(spaceId: "<space_id>", environmentId: "<environment_id>", // Defaults to "master" if omitted accessToken: "<access_token>") // Snippets for the images API assume that you already have an `Asset` in memory. var asset: Asset = ... // Type passed into callback will be a UIImage or NSImage depending on the current platform. client.fetchImage(for: asset, with: [ImageOption.formatAs(.png(bits: .standard))]) { (image: Result<UIImage>) in switch result { case .success(let image): // Use the image. case .error(let error): print(error) } }
- fetch and fetchArray consistently taking upwards of 2s
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 contentful.swift.