Method not found: '!!0 System.Text.Json.JsonSerializer.Deserialize(System.ReadOnlySpan`1<Byte>, System.Text.Json.JsonSerializerOptions)' - exception

Just tried to create a new web api .net 6.0 and on first build/run getting error:
1>obj\Debug\net6.0\staticwebassets.build.json : error : MissingMethodException: Method not found: '!!0 System.Text.Json.JsonSerializer.Deserialize(System.ReadOnlySpan`1, System.Text.Json.JsonSerializerOptions)'.
Any Idea?!

Related

Failed to connect jira api: failed to access class BasicHttpCache from class CachingHttpAsyncClient

I faced an issue durring connecting to jira api by existing code on ear application using application server wildfly19.0.1.Final :
1- the added code :
AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
IssueRestClient client= factory.createWithBasicHttpAuthentication(URI.create("https://jiralink.com"), "username", "password");
dependencies
org.apache.httpcomponents:httpasyncclient-cache:4.1.4
org.apache.httpcomponents:httpclient-cache:4.5.5
the issue:
Caused by: java.lang.IllegalAccessError: failed to access class org.apache.http.impl.client.cache.BasicHttpCache from class org.apache.http.impl.client.cache.CachingHttpAsyncClient (org.apache.http.impl.client.cache.BasicHttpCache is in unnamed module of loader 'deployment.MegaPack.ear.httpclient-cache-4.5.5.jar' #51bff63e; org.apache.http.impl.client.cache.CachingHttpAsyncClient is in unnamed module of loader 'deployment.MegaPack.ear.httpasyncclient-cache-4.1.4.jar' #1746dc55) at org.apache.http.impl.client.cache.CachingHttpAsyncClient.(CachingHttpAsyncClient.java:174) ~[httpasyncclient-cache-4.1.4.jar:4.1.4] at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.

StreamSocketListener and "An invalid parameter was passed to a function that considers invalid parameters fatal." error

I have a simplest WinRt c++/cx template project in Visual Studio in which i modified only three lines in MainPage constructor and added simple event handler like this:
MainPage::MainPage()
{
InitializeComponent();
auto listener = ref new Windows::Networking::Sockets::StreamSocketListener;
listener->ConnectionReceived += ref new Windows::Foundation::TypedEventHandler<Windows::Networking::Sockets::StreamSocketListener ^, Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs ^>(this, &App3::MainPage::OnConnectionReceived);
Concurrency::create_task(listener->BindEndpointAsync(ref new Windows::Networking::HostName("127.0.0.1"), "6667")).get();
}
void MainPage::OnConnectionReceived(Windows::Networking::Sockets::StreamSocketListener ^sender, Windows::Networking::Sockets::StreamSocketListenerConnectionReceivedEventArgs ^args)
{
throw ref new Platform::NotImplementedException();
}
After running this project i'm getting debugger error like this:
Unhandled exception at 0x0F983C68 (msvcr120d_app.dll) in XXX.exe: An invalid parameter was passed to a function that considers invalid parameters fatal.
This project has enabled "Internet (Client and Server)" and "Private Networks" capabilities.
So my question is: why i'm getting this error? It's a WinRt bug?

The type initializer for 'Tweetinvi.TwitterCredentials' threw an exception while Autofac is 3.3+

i want to retrieve tweets from twitter using specific hashtags.
i am using tweetinvi for this purpose.but i am getting an error
outer exception:
The type initializer for 'Tweetinvi.TwitterCredentials' threw an exception.
Inner exception:
{"Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)":"System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes"}
i am using autofac 3.4.
kindly point out what am i doing wrong?
TwitterCredentials.SetCredentials("useraccesstoken",
"useraccessecret",
"consumerKey",
"consumerSecret");
var searchParameterSearch.GenerateTweetSearchParameter("#pakvsSA");
searchParameter.SetGeoCode(-122.398720, 37.781157, 1,DistanceMeasure.Miles);
searchParameter.Lang = Language.English;
searchParameter.SearchType = SearchResultType.Popular;
searchParameter.MaximumNumberOfResults = 100;
searchParameter.Until = new DateTime(2015, 12, 3);
searchParameter.SinceId = 399616835892781056;
searchParameter.MaxId = 405001488843284480;
var tweets = Search.SearchTweets(searchParameter);
So it looks like there are some .dll required by Tweetinvi (Sytem.Core) that are missing.
I would strongly advise using nuget to install Tweetinvi as a package as it will automatically install and reference all required dll.
https://www.nuget.org/packages/TweetinviAPI/

securesocial 3.0 doesn't work with play framework 2.3

1.When i upgrade my play framework from 2.2.6 to 2.3.8 and securesocial from 2.1.4 to 3.0-M3. I got the following error. How to fix it?
[error] /Work/test.scala:81: not found: value SecuredAction
[error] def findStats = SecuredAction {
2.The following line used to work but now it gets an error message:trait SecureSocial takes type parameters.How to fix this?
object ToolbarHandler extends Controller with SecureSocial with CookieLang{
3.Request needs a parameter.How to add the parameter though?
def findStats = SecuredAction {
implicit request =>
You have to use the snapshot version.
As stated here : http://securesocial.ws/guide/getting-started.html
add:
resolvers += "Sonatype OSS Snapshots" at "https://repo.typesafe.com/typesafe/snapshots/"
then add the library dependency:
"ws.securesocial" % "securesocial_2.11" % "master-SNAPSHOT"
Hope that helps.

ExtJS5: Uncaught TypeError: Cannot read property 'idProperty' of undefined

I upgraded from Ext JS 4.2.3 to 5.0.1 and I have the following error. Any ideas?
Uncaught TypeError: Cannot read property 'idProperty' of undefinedext-all-debug.js:68239 Ext.define.applyRootext-all-debug.js:6842 setterext-all-debug.js:121857 Ext.define.initComponentext-all-debug.js:36830 Ext.define.constructorext-all-debug.js:8144 Ext.Base.Base.addMembers.callParent