aliyun / aliyun/credentials-csharp
Aliyun.Credentials 更新 1.4.3 后 AlibabaCloud.OpenApiClient 无法正常实例化,报错 System.MissingMethodException
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
在执行如下代码时引发:
_apiClient = new(new()
{
Endpoint = options.Value.Endpoint,
Credential = credentialClient,
});
堆栈信息:
Unhandled exception. System.MissingMethodException: Method not found: 'Void Aliyun.Credentials.Client..ctor(Aliyun.Credentials.Models.Config)'.
at AlibabaCloud.OpenApiClient.Client..ctor(Config config)
at AlibabaCloud.SDK.Cdn20180510.Client..ctor(Config config)
at AliCdnSSLWorker.Services.AliCdnService..ctor(ILogger`1 logger, IOptions`1 options) in /src/Services/AliCdnService.cs:line 28
通过查看堆栈信息,问题由 AlibabaCloud.OpenApiClient.Client..ctor(Config config) 引发,可能是该库内调用 this._credential = new Aliyun.Credentials.Client(credentialConfig); 时候,无法找到接收参数为 Config 的构造函数。
看了源码之后有些奇怪的,为什么不重载构造函数?
不过我也很奇怪,即使是现在这样,也应该能够擦除到 object 才对啊?
似乎应该在 darabonba-openapi 开 issue,但是考虑到如果确实是因为构造函数接收的参数从 Config config 到 object obj 引发的问题,那应该在其他一些 SDK 中也存在,所以我先来这边开个 issue 问下,至于是这个 SDK 更新的问题还是 darabonba-openapi 没有更新调用的方法还看你们怎么解决了。如果我不该在这里开 issue 的话还请提示我一下,谢谢
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from AliCdnService.cs line 28 using the shown OpenApiClient construction and inspect the AlibabaCloud.OpenApiClient.Client and Aliyun.Credentials.Client constructors involved in the stack trace. Compare the referenced Aliyun.Credentials versions and determine which package or generated call is incompatible; done means the client instantiates successfully with the reported dependency update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100