Skip to content

Object not set to an instance of an object#35

Merged
avonwyss merged 1 commit intoridercz:masterfrom
rokx:master
Jan 30, 2019
Merged

Object not set to an instance of an object#35
avonwyss merged 1 commit intoridercz:masterfrom
rokx:master

Conversation

@rokx
Copy link
Copy Markdown
Contributor

@rokx rokx commented Jan 8, 2019

I was receiving "object not set to an instance of an object" exception when trying to create certificate for multiple subdomains.
Updated packages and expanded the creation of AcmeAccount. I no longer receive the exception.

@avonwyss avonwyss self-requested a review January 9, 2019 00:05
@avonwyss
Copy link
Copy Markdown
Collaborator

avonwyss commented Jan 9, 2019

These changes are problematic. Specifically the binding redirects of System.Net.Http must remain 0.0.0.0-4.2.0.0 => 4.1.1.3 (or whatever version is in the NuGet package). Google will give you plenty of hits like this when you search for the issues related to these versions.

Also I don't see how your changes might affect the exception you were getting, since the code in itself is semantically the same. I wonder if there was some other problem (network or whatever) when you tried before your changes. May I kindly ask you to try whether the version without your changes does work or not, and if not post the full exception details?

Copy link
Copy Markdown
Collaborator

@avonwyss avonwyss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change System.Net.Http binding redirects to 0.0.0.0-4.2.0.0 => 4.1.1.3, and test whether these changes actually fix anything.

…ause of null reference exception. Possibly because await and object creation dont mix well
@rokx
Copy link
Copy Markdown
Contributor Author

rokx commented Jan 10, 2019

This is the verbose output i am getting with the latest version from your master.

C:\...\AutoACMEtest>autoacme.exe addhost "domain.com example.domain.com" /verbose
...
Reading configuration from 'C:\...\AutoACMEtest\autoacme.json'...OK
Checking host...OK
Requesting certificate for domain.com example.domain.com:
Using server https://acme-staging-v02.api.letsencrypt.org/directory
Creating registration for 'ro*******om' and accept TOS...OK
Request failed!
Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.
at Altairis.AutoAcme.Core.AutoAcmeContext.d__21.MoveNext()
Failed!
Unable to get certificate for new host.

Moving
Agreement = await context.TermsOfService().ConfigureAwait(true),
after object creation solves null reference exception.

I removed the updated packages stuff.

@avonwyss
Copy link
Copy Markdown
Collaborator

avonwyss commented Jan 10, 2019

Thanks @rokx for cleaning up the PR, I can approve that. @ridercz will take care of making a new release sometime.

@avonwyss avonwyss merged commit e819baf into ridercz:master Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants