React Native SDK returns error code 17 while ceating a channel but node library works fine - react-native

On trying to create a channel using the react Native SDK, I get the following error
Error: StreamChat error code 17: GetOrCreateChannel failed with error: "User '12345' with roles ['user', 'channel_member'] from teams ['red', '7fdfce50-asdd-ddsaa-976a', '02asdadsa-8ddsadad-adadasdad-7-ca3'] cannot access resource in scope 'messaging' because requested resource does not belong to any team"
But when I try to create a channel using the node library, it works perfectly fine.. any ideas why this is happening?

That error in our case was caused by multitenancy, which may or may not be your issue. The code below works if you're running an app with multitenancy:
const channel = client.channel("messaging", `someuniquestring`, {
team: "Team Name",
members: [memberId1, memberId2],
});
await channel.watch();

Related

trying to login to agora rtm but receive the following error: The vendor enabled the dynamic key, but uses the static key

Hey guys i'm trying to log into agora rtm using javascript and passed the following params to the login function:
param 1: token = null;
param 2: uid = String(Math.floor(Math.random() * 10000))
passed them to the login function as follows:
await client.login({token, uid});
however recieve the following error messages:
RTM:ERROR Error Code 5 - The vendor enabled the dynamic key, but uses the static key. RTM:ERROR Error Code 5: login failed with args: {"token":null,"uid":"91"}.**
does anyone have a workaround for this? i have set the project as 'testing' in the agora console
The vendor(appId) you are using has token enabled or you can say need a token and appId
for authentication.

React native in app purchase not giving latest receipt

I am using react-native-iap package. I am trying to get latest subscription and check its validity
await RNIap.validateReceiptIos(receiptBody, true).then((receipt) => {
try {
const renewalHistory = receipt.latest_receipt_info
const expiration = renewalHistory[0].expires_date_ms
expired = Date.now() > expiration
productId = renewalHistory[0].product_id
} catch (error) {}
})
I am multiple auto renewal subscription in a single group. I subscribe to one and I execute code above give me the subscribed product and i tag it as subscribed. First try works fine. Now after that I subscribe again another package and run code above gives me the previous subscription not the current that i subscribed. Sometime second steps also works fine but issue came in third step. Reason I found is I am not getting latest subscribed receipt info in latest_receipt_info above.
Have a look to this tutoriel on YouTube it may help you : https://youtu.be/4JLHRV2kiCU
Also, here is what he said in the comment section :
where I write renewalHistory[renewalHistory.length - 1], this works fine in the test environment. HOWEVER, it seems that when the app is published, this doesn't work and you should instead do renewalHistory[0].
I fixed this in my app by first trying to validate using the production URL, using renewalHistory[0].
If you receive a 21007 status code after trying to validate with the production URL, you validate using the test URL using renewalHistory[renewalHistory.length - 1]

Firestore: "There was an unknown error while processing the request"

This is my query:
var timesRef = db.collection('times');
var timesWeek = timesRef
.where('Date', '>=', this.mon)
.where('Date', '<=', this.sun)
.where('Task', '==', this.task)
.where('User', '==', this.user);
timesWeek.get()
.then(function(querySnapshot) {
querySnapshot.forEach(function(doc) {
console.log(doc.data());
});
})
.catch(function(error) {
console.log('Error getting documents: ', error);
});
It yields this error:
Error: The query requires an index. You can create it here:
https://console.firebase.google.com/project/myprojectlog-bd174/database/firestore/indexes?create_index=EgV0aW1lcxoICgRUYXNr...CGggKBERhdGUQAhoMCghfX25hbWVfXxAC
Problem is, when I click that link I arrive at a page with an error message in the middle: "There was an unknown error while processing the request. Try again". Every single time.
Could there be a typical reason why this happens?
I know I can create a composite index manually but I wasn't able to do so successfully (I tried to create one with Date: ascending, Task: ascending, User: ascending, I'm getting the same error).
Just in case here's a screenshot of the browser console.
Verify that the project corresponds with your current account, or try logout / login with the corresponding account for that project.
I think you are creating an index on a different project or you are using wrong project ID somewhere in your code. Your URL points to project myprojectlog-bd174, and in browser console screenshot it is timelog-bd174. Or you replaced manually when pasting here in question? :) Try opening that link from browser console in incognito window, you might have been logged in with wrong user on Firebase console or you have reached a limit for free plan.

ServiceLocatorImplBase.cs not found on calling API help page

When I Uncomment this line for api documentation
//// Uncomment the following to use the documentation from XML documentation file.
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/BitCoinWrapperAPI.xml")));
I received an error :
An exception of type 'Microsoft.Practices.ServiceLocation.ActivationException' occurred in Microsoft.Practices.ServiceLocation.dll but was not handled in user code
Additional information: Activation error occured while trying to get instance of type HelpController, key ""
When I call the Index page in the HelpController of the API, anybody knows why?
Well I added this line and it works without exception
ObjectFactory.Configure(x => x.SelectConstructor(() => new HelpController()));

400 Bad Request error when using .net Paymill Wrapper

I'm trying to use the .net Paymill Wrapper
When trying to add a subscription, I'm getting back a 400 Bad Request.
To illustrate the problem, I created a branch and changed the Sandbox console app to call the method to test addSubscription
The problem is happening here where the request is actually posted.
The content posted is: (as an example)
client=client_bbe895116de80b6141fd&
offer=offer_32008ddd39954e71ed48&
payment=pay_81ec02206e9b9c587513
It appears this hasn't been updated for sometime, and the original author is unresponsive via email or twitter, so I've forked the repo and am trying to fix the error.
I had a look at your code and found out that you are not creating the offer object correctly.
In your addSubscription method (SandboxConsole project), i found this code snippet
Subscription subscription = new Subscription();
subscription.Client = new Client() { Id = "client_bbe895116de80b6141fd" };
subscription.Offer = new Offer() { Id = "offer_32008ddd39954e71ed48" };
subscription.Payment = new Payment() { Id = "pay_81ec02206e9b9c587513" };
Offer object should be initialized with parameters like amount, currency, interval.
Since the offer object doesn't exist, assigning a subscription to it fails, giving you bad request error.