Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No Notification for Data Message

Open
#62 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
firebase, javascript
Domain
mobile

Research direction

Start with doc/cloud-messaging.md and reproduce the report using the provided curl request and in-app message handler on iOS 11.1.1 with Tabris.js 3.0.0-beta1. Compare foreground and closed-app behavior, then determine the documented expected handling for data messages and verify that the notification behavior matches it.

Written by the indexing model from the issue text.

Description

bug ios
Problem description

When I send a 'data' message, no notification is shown if the app isn't open. I took a look at #9, but I'm fairly certain I'm composing the message correctly.

Expected behavior

The documentation states that a 'data' message is "a notification that also delivers its data to the app", so, I would expect a notification to appear.

Environment
  • Tabris.js version: 3.0.0-beta1
  • Device: iPhone 7
  • OS: iOS 11.1.1
Code snippet
In-app Javascript:
/* check to see if app was launched by notification tap */
setTimeout(() => { // workaround for #41
  console.log('launchData after timeout: ', firebase.Messaging.launchData);
});

/* handle any messages that arrive */
firebase.Messaging.on('message', ({data}) => {
	console.warn('Received message data: ', data)
});
Command Line Notification Composition:
curl -X POST -H "Authorization: key=$key" -H "Content-Type: application/json" -d "{
    \"to\": \"$token\",
    \"data\": {
	  \"title\": \"Title\",
	  \"body\": \"Body\",
      \"payload\": \"custom data\"
    }
  }
" https://fcm.googleapis.com/fcm/send
# Response in terminal: {..."success":1,"failure":0,...}

If the app is open, then the following prints:
Received message data: {payload: 'custom data', title: 'Title', body: 'Body',...}

But if the app is closed, then nothing prints.

Dominant language
JavaScript
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from eclipsesource/tabris-plugin-firebase

All issues in eclipsesource/tabris-plugin-firebase

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.