{"__v":107,"_id":"551ef4f04986f62b00a7205c","category":{"__v":1,"_id":"551ef4ef4986f62b00a72037","pages":["551ef4f04986f62b00a7205c"],"project":"542b6018044e1e2200413772","version":"551ef4ef4986f62b00a7202e","reference":false,"createdAt":"2014-10-20T19:31:09.962Z","from_sync":false,"order":18,"slug":"troubleshooting","title":"Troubleshooting"},"parentDoc":null,"project":"542b6018044e1e2200413772","user":"54455e750a8dbc1a00ff699c","version":{"__v":7,"_id":"551ef4ef4986f62b00a7202e","forked_from":"542b6018044e1e2200413775","project":"542b6018044e1e2200413772","createdAt":"2015-04-03T20:15:43.149Z","releaseDate":"2015-04-03T20:15:43.149Z","categories":["551ef4ef4986f62b00a7202f","551ef4ef4986f62b00a72030","551ef4ef4986f62b00a72031","551ef4ef4986f62b00a72032","551ef4ef4986f62b00a72033","551ef4ef4986f62b00a72034","551ef4ef4986f62b00a72035","551ef4ef4986f62b00a72036","551ef4ef4986f62b00a72037","551ef4ef4986f62b00a72038","551ef4ef4986f62b00a72039","551ef4ef4986f62b00a7203a","551ef4ef4986f62b00a7203b","551ef4ef4986f62b00a7203c","551ef4ef4986f62b00a7203d","551ef4ef4986f62b00a7203e","55d7f1879510f00d007ec727","56b94a5a9fc0de1700b60ae9","56bd0e48ac1c5c1900b2dbe4","56d74afc3eb4dd0b0020196a","5723ab8a1f41110e003081ed","576b4dd327d6252b00085422"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"updates":[],"createdAt":"2014-10-21T20:05:20.347Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"1. No Users show on the OneSignal dashboard after installing the SDK\"\n}\n[/block]\n**A.** *OneSignal AppID* - Double check your passing the correct id to OneSignal init in your app's code. Your app id is shown under \"App Settings\" under the \"Keys & IDs\" tab on the dashboard.\n\n**B.** *OneSignal Init* - Add logging before and after you call OneSignal init. To make sure the code is running.\n**C.** *Device Logs* - Check the device log for any errors or warnings.\n - **Android** - Check the logcat in Android Studio or Eclipse. You can also run ddms found in <android-sdk>/tools/ddms or run `adb logcat`\n - **iOS** - Open Xcode and go to Window>Devices. Select your device on the right then the log will show on the bottom. If you don't see the log click the small up arrow on the bottom of the window.\n\n**D.** *Extra Logging* - Enable OneSignal logging. Look for the SetLogLevel function in API Reference for the SDK you using to enable.\n\n**E.** *More Troubleshooting* - Check for the SDK specific Troubleshooting guides on the left.\n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"2. All Users are shown as not subscribed\"\n}\n[/block]\n**iOS**\n - *Provisioning Profile* - Follow the steps in part 5 of [our iOS configuration guide](/v2.0/docs/generating-an-ios-push-certificate#5-provisioning-profiles) to make sure \"Push Notifications\" are enabled on your provisioning profile and it is synced to your system with Xcode.\n\n- *App Permissions* - If you did not get a prompt asking for notification permissions make sure it is enabled for you app under System Settings > Notifications.\n\n- *Logs* - Check the Xcode log for any errors or warnings.\n\n- *Simulator* - You must run on a real device, the simulator can not subscribe for push notifications due to Apple restriction\n\n- *Other Plugins / SDKs* - Other plugins or SDKs that also include push notifications can interfere with registering. Try temporarily removing them.\n\n**Android**\n - *Google Play services* - Make sure this is installed under Settings > App and is version 8.4 or greater.\n *If it is out of date you will need to open the Play Store and sign in. It will update automatically in the background after a few minutes.*\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://www.filepicker.io/api/file/pLxWCGsQfuolxQRnwpxE\",\n \"GooglePlayServices_Android.png\",\n \"720\",\n \"548\",\n \"#ce374f\",\n \"\"\n ]\n }\n ]\n}\n[/block]\n*The OneSignal SDK supports back to version 7.0.0 of Google Play services. The version on the device must be the same version or newer than the version you build your app with.*\n<br>\n - *Emulator* - We recommend testing on a real device, over using an emulator. If you using AVD in the AndroidSDK make sure the \"Target\" has \"Google APIs\" in the name and is API Level 19 or greater.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://www.filepicker.io/api/file/vlY6yu1HTxancrTAnVB6\",\n \"Valid_Android_AVD_for_push.png\",\n \"535\",\n \"217\",\n \"#2b65ae\",\n \"\"\n ]\n }\n ]\n}\n[/block]\n - *Log* - See the device's logcat for any errors or warnings.\n\n- *Enable OneSignal Logging* - Look for the SetLogLevel function in API Reference for the SDK you using to enable.\n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"3. Notifications show successful but are not being shown\"\n}\n[/block]\n**A.** *In app* - A notification will not be displayed on the device if your app is currently in focus by default. However, you can call EnableInAppAlertNotification with true to show notifications as alert boxes in your app.\n\n**B.** *Android* - *Force Stop* - When an app is in a \"Force Stopped\" state most events including GCM messages for push notifications will not be received. An app can be placed in this state in the following ways.\n * From Settings > Apps, \"Force Stop\" is pressed.\n * Long pressing the back button on some devices.\n * Using a 3rd party task killer like Greenify.\n * App is closed on a Huawei or Xiaomi device due their custom Android tweaks.\n * Huawei - Go to Settings > \"Protected apps\", check your app.\n * Xiaomi - Make sure \"Auto-start\" property enabled for your app in the settings.\n \n**C.** *Permission Disabled*\n - *iOS* - Check your app under Settings > Notifications.\n - *Android* - Check the notification setting under Settings > Apps\n\n**D.** *Network Issues* - The network / WiFi you're connected to may have closed your connection to Apple or Google servers'. Try disabling and re-enabling your internet connection. See [this post](http://stackoverflow.com/questions/32866191/push-notifications-take-too-long-to-arrive/32874633#32874633) for more details.\n\n**E.** *Web Push* - Make sure the browser is not in full screen mode.\n[block:html]\n{\n \"html\": \"<br><br>\"\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"4. Duplicated Notifications\"\n}\n[/block]\n**Android** - Check to make sure you don't have another push notification plugin/SDK in your app as it could be displaying a 2nd notification. Our Android SDKs prevent duplicate notifications by checking for the notification id so two will never be created from our official SDKs.\n\n**iOS** - There is a bug with iOS that can display a push notification twice in development after reinstall your app many times. You will need to reboot the iOS device to fix the issue. See [this github issue](https://github.com/one-signal/OneSignal-iOS-SDK/issues/18) for more details.\n<br><br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"5. Resetting the iOS Notification Permission Prompt\"\n}\n[/block]\n*(Pre iOS 9)*\niOS prompts the user to allow displaying of notifications with a system prompt. Our SDK's default setting is to request permissions as soon as your app is opened however we recommend you delay the prompt by disabling autoRegister and calling register at a later point. *(See the SDK API that applies to your app for details)* Delaying the prompt can get your app better opted rates if you prompt after they compete your tutorial for example. Since iOS remembers the answer to the notification permissions question even after a full reinstall it can be tricky to reset the prompt to test it again so we have written the following instructions below.\n<br>\n\n ** Clear Notification Permission Answer **\n1. Uninstall your app.\n2. Reboot the device.\n3. Set your system clock ahead 1 day. \n*(Do no set your clock over 1 week ahead as you may no longer receive pushes)*\n4. Reboot the device again.\n5. Reinstall your app and it will prompt you again.\n\n<br>\n** Quick way to test displaying of the prompt **\n1. When you see the notification permission DO NOT answer it.\n2. Power the device off.\n3. After the device powers back on, fully uninstall then reinstall your app.\n\n<br>\n** IOS 9 **\n - Permission is now reset when the app is uninstalled.\n\n<br>\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"6. iOS notifications with action buttons not displaying\"\n}\n[/block]\nIn order for notifications with buttons to display the following must be true:\n\n* You can not force close the app by double tapping the home button and swiping away your app.\n* Go to Settings>General>\"Background App Refresh\" and mke sure it is enable for both the device and your app.\n[block:image]\n{\n \"images\": [\n {\n \"image\": [\n \"https://www.filepicker.io/api/file/BevSSOUeQUmwC2Pr4zXX\",\n \"Screen Shot 2015-12-17 at 1.54.25 PM.png\",\n \"768\",\n \"410\",\n \"#49a8ce\",\n \"\"\n ]\n }\n ]\n}\n[/block]\n* Make sure \"Remote notifications\" are checked under Capabilities>Background Modes shown in [step 2. Add Required Capabilities](https://documentation.onesignal.com/docs/installing-the-onesignal-ios-sdk#2-add-required-capabilities). Note: This is automatic for some plugins like Cordova and Corona.\n\n<br><br>\n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Still having problems? We're happy to help!\",\n \"body\": \"We answer most support queries in under 4 hours during the week, and under 24 hours on weekends. Simply email us at support:::at:::onesignal.com. \\n\\nInclude as much as you can of the following to help us find your issue quicker: \\n\\n- Version of our SDK \\n- Version of the SDK\\n- Device OS version\\n- Building on Mac or Windows\\n- Xcode log or logcat of the app starting and the problem point\\n- Any other libraries or plugins in your app\\n- Details on reproducing your problem.\"\n}\n[/block]","excerpt":"","slug":"common-problems","type":"basic","title":"Common Problems"}