Cysharp / Cysharp/UniTask

UniTaskSynchronizationContext incompatible with IAPServices in Unity

Open
#708 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
11.2k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hello,

i found the following issue when using Unity with UniTask within an android project with the IAP package.

To use IAP (In-App Purchasing) you have to connect your game with the store which uses a task you have to wait for. If you now also have the UniTask Package installed and have overwritten the SynchronizationContext explained in https://github.com/cysharp/UniTask?tab=readme-ov-file#unitasksynchronizationcontext , then the task will never end. There is no error, no confirmation, no logs, nothing. The task will run forever.

After i removed the injection of the UniTaskSynchronizationContext everything worked. Just wanted to note it somewhere because i was debugging for a very long time and found no similiar issues/problems. Maybe an additional hint to be careful about this circumstance coulb helpful for other developers as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the UniTaskSynchronizationContext guidance linked in the report and reproduce the IAPServices store-connection task on Android with the context injection enabled. Compare it with the behavior after removing that injection; done means determining the compatibility cause and defining a verified fix or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.