snoowrap
snoowrap copied to clipboard
FetchAll() throwing : TypeError: Cannot assign to read-only property '_bitField'
I'm trying to get all subreddits that a user is subscribed to and I keep getting an error.
async function getAllSubscriptions() {
try {
const r = createSnoowrapRequester();
r.config({ debug: true })
let s = await r.getSubscriptions({ limit: 1 })
//this works
console.log(s.length);
//this doesn't work
let all = await s.fetchAll({ append: true });
console.log(all.length);
} catch (error) {
console.log(error);
}
}
TypeError: Cannot assign to read-only property '_bitField'
I tried FetchMore() and it works up to a certain amount. 100 works but 110 failed with the same error.
async function getAllSubscriptions() {
try {
const r = createSnoowrapRequester();
r.config({ debug: true })
let s = await r.getSubscriptions({ limit: 1 })
//this works
console.log(s.length);
let all = await s.fetchMore({ amount: 100, append: true });
//this doesn't works
console.log(all.length);
} catch (error) {
console.log(error);
}
}
I am using Expo Managed React Native.