Fix bug in getting publicId
Change to using a promiseFulfillerPair for passing SessionContext