I'm getting the error: The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.
When using:
private _jeSelectPermission = async () => {
try{
const ler = await sp.web.lists.ensure("MyList");
const list: IList = ler.list;
await list.roleAssignments();
const user = await sp.web.currentUser();
const ReadroleDefinition = await sp.web.roleDefinitions.getByName("Read").get();
console.log("roleDefinition : ", ReadroleDefinition);
await sp.web.lists.getByTitle('MyList').items.getById(this.state.JEId).roleAssignments.add(user.Id, ReadroleDefinition.Id);
const info = await sp.web.lists.getByTitle('MyList').items.getById(this.state.JEId).roleAssignments();
console.log(info);
} catch(error){
console.log(error);
}
}
It works initially, so if I set permissions onto several items one by one, it works, but then starts to show these errors, or actually doesn't show the errors in the console and fail to add the permissions. Any ideas?