Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type initializer for 'Diadoc.Api.ProtobufPrepareSerializerInitializer`1' threw an exception. #1186

Open
Edw-K opened this issue Feb 17, 2025 · 1 comment

Comments

@Edw-K
Copy link

Edw-K commented Feb 17, 2025

Один из наших клиентов столкнулся с проблемой, схожей в
#991
Он установил последнее DiaDocApi.dll и нашу библиотеку
При попытке авторизации по паролю получает ошибку
DiadocFuncs.AuthenticateByPassword
crypt
diadocAPI
UsingSystemProxy=True
SetSolutionInfo
Authenticate
DiadocFuncs Exception=-1, The type initializer for 'Diadoc.Api.ProtobufPrepareSerializerInitializer1' threw an exception. at Diadoc.Api.ProtobufPrepareSerializerInitializer1.Prepare()
at Diadoc.Api.ProtobufHttpSerializer.Serialize[T](T obj)
at Diadoc.Api.DiadocHttpApi.Serialize[T](T obj)
at Diadoc.Api.DiadocHttpApi.Authenticate(String login, String password, String key, String id)

at GalDiadocConnectS.GalDiaDocConnectS.DiadocRunFunc(Int32 iFunc, String _Par1, String _Par2, String _Par3, String _Par4, String _Par5, String _Par6)
iFunc=6 ,_Par1 =https://diadoc-api.kontur.ru, _Par2=api-f080223d-8af2-47b5-9fc6-e377d07e7e4e, _Par3
Выше диагностические сообщения, чтобы проверить что они прошли успешно.
В чем может быть причина?
У нас это же сочетание работает без ошибок.
Наша библиотека точно новая - специально добавил новые строки в отладочный протокол. С вашей старой бы вообще бы не запустилось.
Сейчас для сборки нашей библиотеки используется DiadocSDK.2.30.0.nupkg

@Edw-K Edw-K changed the title he type initializer for 'Diadoc.Api.ProtobufPrepareSerializerInitializer`1' threw an exception. The type initializer for 'Diadoc.Api.ProtobufPrepareSerializerInitializer`1' threw an exception. Feb 17, 2025
@Edw-K
Copy link
Author

Edw-K commented Feb 17, 2025

Возможно они используют proxy. До этого использовали sdk с++ , где подключение идет корректно(но там же 2 года нет изменений - приходится уходить).
Но был включен соответствующий параметр. строка
UsingSystemProxy=True
говорит о том , что это произошло успешно.
До установки он получал и другие ошибки ( к сожалению при этом он не приложил лог драйвера, так что вид другой )
Ошибка авторизации.
407 BaseUrl=https://diadoc-api.kontur.ru, PathAndQuery=/V3/Authenticate?type=password, AdditionalMessage=<TITLE>Сообщение об ошибке</TITLE>

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

No branches or pull requests

1 participant