Google script TypeError: Cannot read property 'appendRow' of null

hi guys. i’m noob.
i want send data with ‘Mit App Inventor2’ to ‘google spreadsheet’

i see the youtube and maked it, but i have problem.
here is my code. i just blind spread sheet URL.

function doGet(e) {
var ss = SpreadsheetApp.openByUrl("—sheet URL;—");
var sheet = ss.getSheetByName(“Sheet1”);

addUser(e,sheet);
}

function doPost(e) {
var ss = SpreadsheetApp.openByUrl("—sheet URL;—");
var sheet = ss.getSheetByName(“Sheet1”);

addUser(e,sheet);
}

function addUser(e,sheet) {
var id = e.parameter.id;
var name = e.parameter.name;

sheet.appendRow([id,name]); // this part is matter.
}

TypeError: Cannot read property ‘appendRow’ of null
so i cant send my data to spread sheet.

i cant know why it happen. can you help me?