Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Unkown error occured while connection #25

Open
shunnmugam opened this issue Jul 9, 2020 · 20 comments
Open

[QUESTION] Unkown error occured while connection #25

shunnmugam opened this issue Jul 9, 2020 · 20 comments
Labels
question Further information is requested

Comments

@shunnmugam
Copy link

shunnmugam commented Jul 9, 2020

Question

While trying example application it's throwing error

Environment

2806 : Forbidden
"react": 16.11.0,
"react-native": 0.62.2,
"react-native-google-nearby-messages": 1.0.20
@shunnmugam shunnmugam added the question Further information is requested label Jul 9, 2020
@LeviWilliams
Copy link
Contributor

Steps to reproduce? Are you able to run the example app?

@LeviWilliams
Copy link
Contributor

LeviWilliams commented Sep 23, 2020

Returning back to this issue because I just experienced it, here's the catch error from my subscribe/publish hook: 'Error: 2806: FORBIDDEN. See: https://developers.google.com/android/reference/com/google/android/gms/nearby/messages/NearbyMessagesStatusCodes'

Edit: Specifically on Android, looking into iOS now

@mrousavy
Copy link
Owner

That's very weird, especially because the Google Nearby Messages API doesn't give us more info on anything

@LeviWilliams
Copy link
Contributor

LeviWilliams commented Sep 24, 2020

Exactly, I did more looking into the error to make sure it wasn't something wrong with my API or the ability to connect to the API and I can't find anything to indicate that. I'll keep looking into this more in my application as I debug.

Update: Unable to find any traces using the error hook provided, also narrowed down the issue to publishing a message. Subscribe/connect seem to be working as expected but when a message is published this error occurs without fail in my app.

@LeviWilliams
Copy link
Contributor

@mrousavy Any idea on what this could be? This suddenly popped up in my app and am unable to find a fix, been doing more debugging and have been able to reproduce on several devices. Still unsure about the iOS impact as I've been stuck in iOS 14 update hell.

@mrousavy
Copy link
Owner

@LeviWilliams Unfortunately I have no idea what's causing this, and I cannot reproduce it so I have to fully rely on you guys. Are you saying you're getting that error since the iOS 14 upgrade?

@mrousavy
Copy link
Owner

Whoops, just read you're talking about android. I'll check if there are any outdated packages tomorrow morning, like the google services.

@LeviWilliams
Copy link
Contributor

Perfect, it could be an Android specific thing I've just been having xCode issues so haven't been able to reproduce yet.

@LeviWilliams
Copy link
Contributor

LeviWilliams commented Sep 30, 2020

Nothing wrong on the iOS side it seems, couldn't find anything errors. @mrousavy any updates on the packages?

@LeviWilliams
Copy link
Contributor

Hey sorry to bug you man @mrousavy , I've just still been unable to use my android app in production so trying to identify issues. Thanks for your help!!

@mrousavy
Copy link
Owner

mrousavy commented Oct 3, 2020

@LeviWilliams sorry, I've been kinda busy with uni. I've got an exam this week, I'll see if I can find some time to take a look at this. Maybe there has been a bug at the official Nearby Messages API from Google, since I didn't change anything.

Also, did a quick check on packages but it seems like we already use the newest Google Services API version (17.0)

@LeviWilliams
Copy link
Contributor

Sounds good @mrousavy , seems like it could be a google bug as this seemed to not appear in any of my production apps until recently. Especially since it seems to only occur when publishing a message.

@LeviWilliams
Copy link
Contributor

Ever seen this @zaptrem ?

@zaptrem
Copy link

zaptrem commented Oct 21, 2020

Ever seen this @zaptrem ?

Yes, I think. Check the documentation on permissions. Google isn't explicit enough that on Android it requires either the precise location permission to be granted or the "Nearby Messages" permission (or something like that). I just went with the precise location one. @LeviWilliams @mrousavy

@LeviWilliams
Copy link
Contributor

@zaptrem Here are the permissions I have:

    <!-- For Nearby Messaging with Bluetooth etc -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

@zaptrem
Copy link

zaptrem commented Oct 21, 2020

@zaptrem Here are the permissions I have:

    <!-- For Nearby Messaging with Bluetooth etc -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

The permission has to be programmatically requested and granted. Having it in the manifest just allows you to request it, it doesn’t guarantee it.

@mrousavy
Copy link
Owner

@zaptrem how do you request the permission? I'd like to implement that logic in a requestBluetoothPermission() func 🔥

@LeviWilliams
Copy link
Contributor

@zaptrem I granted all three permissions (coarse, fine, and record audio) to test using react-native-permissions and it still doesn't change the issue in this thread. @mrousavy also granted permissions in the example app and didn't change the issue.

@josebrc
Copy link

josebrc commented Dec 11, 2020

Hi! i haved the same problem i was reolve deleting the android api key because, was two android key.

@LeviWilliams
Copy link
Contributor

@Josel02 is your android app currently working? I'm still unable to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants