I have a Google Sheet with the OnEdit() function on the sheet script. Also, this script imports a library which is another AppScript with some functions on it. It works perfectly when I'm using the sheet, whenever I edit it, the OnEdit triggers without any problems. But, because I shared this sheet with other people when they edit the sheet, the OnEdit does not trigger. It was working for all the users before I imported the library. After that, the OnEdit just works for me. I know that the problem is because the library is only shared with me, but the thing is that the functions inside the library work just fine with all the users. The only thing that does not work for all, is the OnEdit. I would like to find a solution to that because I cannot share the library with all the users who have access to the sheet. The onEdit just writes in a cell value, that's all the code it has.
I tried the OnEdit in a shared sheet and works perfectly for all. When I add a library, the onEdit works only for me.
function onEdit(e) {
var logSheet = SpreadsheetApp.getActive().getSheetByName('test');
logSheet.appendRow(['You edit']);
}