A native method call that never resolves needs a trace across the boundary, not another indefinite spinner. Identify whether the request reached native code, whether the SDK completed, and whether the response returned to the correct Dart caller.
Use one controlled operation and safe correlation reference. This narrows the investigation without filling logs with private payloads or changing several layers at once.
Trace the four completion boundaries
Record Dart dispatch, native handler entry, SDK completion or failure, and Dart resolution. Verify the correct method registration, engine instance, message schema, and supported platform implementation.
Review the current Flutter native integration reference and generated-binding documentation if used. Completion rules and threading requirements depend on the actual mechanism and versions.
Investigate a fictional native export
Suppose a report-export call resolves when the user chooses a destination but hangs when they cancel. The native handler may return only from the success branch. Reproduce success, cancellation, permission failure, invalid input, and SDK error with harmless fixtures.
Check whether every supported branch completes under the contract and whether repeated callbacks can attempt multiple responses. Add navigation away, activity recreation where relevant, and engine teardown to expose lifecycle assumptions.
If the native SDK never calls back, distinguish that from a bridge response being lost. A diagnostic timeout can reveal the stage and restore a usable interface state, but it does not prove the underlying operation stopped.
Handle uncertain completion before retry
An export might have written a file before confirmation disappeared. Repeating it can create another file or effect. Preserve operation identity and reconcile where the workflow requires it.
Bound pending-call state and release listeners or resources under the lifecycle policy. Do not leave a callback retaining a screen indefinitely after the user closes it. Keep late completion from updating a different feature instance.
The tradeoff is fast symptom relief versus correct repair. Adding a Dart timeout can prevent endless waiting while leaving the native defect intact. Use it as a controlled user-experience boundary and diagnostic signal, then fix the missing or invalid completion path.
The Social App portfolio account documents related native and Flutter work. This hanging export is fictional and does not describe a production incident or tested fix there.
Questions about native calls that hang
Should the first fix be a longer timeout?
Only if evidence shows legitimate work exceeds the current bound. A missing completion branch will not become correct by waiting longer.
Does a timeout cancel native work?
Not automatically. Define cancellation and cleanup separately, and resolve uncertain side effects before retrying.
What should a bug report contain?
Include operation identity, last observed boundary, platform version, lifecycle sequence, and expected completion branch. Bring the trace to a native-call review.