Hello Internet
I've been trying to connect my Google Cloud Storage with the component and can't get it working. On the Google side, we have already set up everything (account, storage, bucket, service user, access certificates, etc.). For this purpose, there is a Forge component that I have been working on intensively over the last few days.Unfortunately, I have not been able to get it to work. Therefore, after I started to doubt myself, I installed the demo of the Forge component and stored the access data via the site properties. Here I get the same error:
Source
Extension method
Message
Object reference not set to an instance of an object.
Environment Information
eSpaceVer: Id=1777, PubId=0, CompiledWith=11.12.0.30002RequestUrl: https://personal-wlfdncte.outsystemscloud.com/GoogleCloudStorageDemo/Upload.aspx (Method: POST)AppDomain: /LM/W3SVC/6/ROOT/GoogleCloudStorageDemo-148-132679923874453488FilePath: C:\OutSystems\Sandboxes\FCCDEQ003\Platform Server\running\GoogleCloudStorageDemo\Upload.aspxClientIp: 178.197.xxx.xxxLocale: en-USDateFormat: dd-MM-yyyyPID: 4932 ('w3wp', Started='6/8/2021 4:54:29 PM', Priv=858Mb, Virt=2116564Mb)TID: 38Thread Name:.NET: 4.0.30319.42000
Stack
Object reference not set to an instance of an object.at Org.BouncyCastle.Crypto.Signers.RsaDigestSigner.Init(Boolean forSigning, ICipherParameters parameters)at OutSystems.NssGoogleAPIToken.CssGoogleAPIToken.GetRS256Signature(Byte[] ssContent, String ssPrivateKey)at OutSystems.NssGoogleAPIToken.CssGoogleAPIToken.MssGetToken(RCClientRecord ssClient, Int32 ssTokenLifespan, String ssScope, RCTokenRecord& ssToken)at ssGoogleCloudStorage.RssExtensionGoogleAPIToken.MssGetToken(HeContext heContext, IRecord inParamClient, Int32 inParamTokenLifespan, String inParamScope, IRecord& outParamToken)
As I interpret the error message, the error does not appear directly in this forge component but is triggered by the GoogleAPIToken forge component.
Unfortunately, I do not see myself in a position to fix the error. It would be great if you could take a look at it.
Possible source of error could by me using open SSL wrong to convert the access certificate from Google in the PK12 format to the PEM format.
Also i found this atricle which doesnt solve my problem: https://www.outsystems.com/forums/discussion/56542/object-reference-not-set-to-an-instance-of-an-object/
Regards
Daniel
It was my error. I forgot to delete the cetificate information before the -----BEGIN PRIVATE KEY--