Skip to content

Fix signed-in actions in production, trim unused push services, fix screenshot workflow - #17

Merged
lohanidamodar merged 3 commits into
mainfrom
fix/app-jwt-header
Nov 8, 2026
Merged

lohanidamodar merged 3 commits into
mainfrom
fix/app-jwt-header

Conversation

@lohanidamodar

Copy link
Copy Markdown
Collaborator

Three fixes found while taking #16 live.

  1. Send the JWT in X-Refetch-JWT. Signed-in actions (vote, comment, submit, profile sync) all answered 401 in production. Appwrite Cloud's edge executor overwrites Authorization with its own Basic opr:<secret> before the request reaches refetch.io. On the phone, the same JWT returned 200 from Appwrite's /v1/account and 401 from /api/app/session. Needs Read the app JWT from X-Refetch-JWT; Cloud's executor overwrites Authorization refetch#14 deployed first.
  2. Remove appwrite 28's unused background-push components from the manifest. These are the remoteMessaging foreground service, flutter_background_service, the boot receivers, and the FOREGROUND_SERVICE* / RECEIVE_BOOT_COMPLETED permissions. Refetch pushes through FCM with the push plugin. Left in, the foreground service needs a Play Console declaration, and the receivers wake the app on every reboot. The merged manifest still has the push plugin's FCM receiver and MESSAGING_EVENT service.
  3. Android screenshot workflow. android-emulator-runner runs each script: line as its own command, so the multi-line flutter drive broke. It's now one line.

flutter analyze is clean, and flutter test passes 65 (new: the JWT travels in X-Refetch-JWT, not Authorization). The debug APK builds, and I checked the merged manifest.

Local push errors (Default FirebaseApp is not initialized) are expected: google-services.json is gitignored and only injected by the release workflow.

🤖 Generated with Claude Code

lohanidamodar and others added 3 commits November 8, 2026 11:26
Appwrite Cloud's edge executor overwrites the Authorization header
before a request reaches refetch.io, so every /api/app/* call answered
401 in production (the JWT itself checked out: 200 from Appwrite's
/v1/account). Pairs with refetch-io/refetch#14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appwrite 28 brings an MQTT foreground service (remoteMessaging),
flutter_background_service and boot receivers. Refetch pushes through FCM
with the push plugin and never starts them; left in, the remoteMessaging
foreground service needs a Play Console declaration and the receivers
wake the app on every reboot. Removed with tools:node=remove, as the
appwrite manifest suggests. The merged manifest keeps the push plugin's
FCM receiver and MESSAGING_EVENT service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
android-emulator-runner runs each script line as its own command, so the
backslash-continued flutter drive fell apart (Target file "\\" not found).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lohanidamodar
lohanidamodar merged commit 6191b98 into main Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant