Bower Install issue

HI,
I am trying to publish the code to Azure through VS 2017 Enterprise RC, but whenever i am clicking publish on ApplePayJS project, it always shows me an error " The command "bower install" exited with code 9009."
I tried changing the Azure deployment from Subscription to FTP but it is showing the same error. Could you please let me know what could be causing this?

Hi there. I've literally been updating the application this afternoon to support the latest Visual Studio 2017 RC and RC4 of the .NET SDK for MSBuild support. I also made some changes to remove use of bower for including local copies of the Bootstrap and jQuery dependencies.
Could you pulling the latest changes from master and seeing if that resolves your issue?

On reflection, I think the problem you're having might be from missing instructions to make bower installed globally, assuming you don't already.
If that is the case, you should run once before trying to publish from Visual Studio:
npm install bower -g

As you're using Visual Studio 2017 RC though, I'd recommend just pulling the latest code from master.

Sure, I shall get the latest and let you know. Thanks for the quick reply.
Cheers,
Sai
On Sun, Feb 12, 2017 at 10:58 PM Martin Costello<EMAIL_ADDRESS>wrote:

On reflection, I think the problem you're having might be from missing
instructions to make bower installed globally, assuming you don't already.
If that is the case, you should run once before trying to publish from
Visual Studio:
npm install bower -g
As you're using Visual Studio 2017 RC though, I'd recommend just pulling
the latest code from master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/justeat/ApplePayJSSample/issues/4#issuecomment-279233768,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXhy1E23dcXZ4dP5SWRR0qAK_i8BfhI1ks5rb0FSgaJpZM4L-icI
.

I took the latest from the project and deployed app to Azure. But it is showing below error in eventlog.xml file.

1000
0
0
Keywords

469548718
Application
RD00155D31FEFF

Application 'MACHINE/WEBROOT/APPHOST/APPLEPAYASPNETCOREAPPLICATIONEXAMPLE' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '"%LAUNCHER_PATH%" %LAUNCHER_ARGS%', ErrorCode = '0x80070002 : 0.

Any Idea what this error is about? Have you tried publishing your latest code to Azure? Do you see same error?

I don't see any errors in that log, it just looks like it's trying to redirect from HTTP to HTTPS in the middleware, which is by design in "Production" as Apple Pay requires HTTPS.
That said, it looks like its timing out trying to render the page when I navigate to the HTTPS version.  The details on how to do that are in the blog post here.
I successfully deployed the latest code to Azure yesterday to the same website that was running the previous release, so I guess it's an environmental configuration issue for the merchant certificate file and/or its password. That was done using the Publish command from VS 2017 RC.

I see you edited the error while I was typing :)
I'm afraid I've not see that error before. The closest I can find about it is here: https://github.com/redhat-developer/s2i-dotnetcore-ex/issues/3
Maybe try flushing out the site directory over FTP manually, restarting the website and then publishing again?

Please find the updated comments above. I am able to get rid of HTTPS error after enabling SSL on my site.
However, it is showing me the error as
"The specified CGI application encountered an error and the server terminated the process"
My appsettings.json file looks as below. I have not changed any other file other than appsettings.json.
I have placed the domain.name.pfx file under wwwroot folder in Azure. I have not given any password while generating pfx. Also, I have not added the certificate in certificate store in Azure.
{
"ApplePay": {
"StoreName": "Personal",
"UseCertificateStore": false,
"MerchantCertificateFileName": "D:\home\site\wwwroot\domain.name.pfx",
"MerchantCertificatePassword": "",
"MerchantCertificateThumbprint": ""
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
Is there anything wrong here?

I did flush out directory manually through FTP and even created new Web App in Azure twice and published twice.

Azure websites can't read pfx files from disk due to the way that Windows needs access to a user profile to do so, which can't be granted in Azure websites.
You have to load the pfx into the certificate store as explained in the blog post under Merchant Validation and set the thumbprint either in appsettings.json or through the environment variables in the appsettings for the website in the portal (the approach I took so I didn't have to worry about edits in the file).

And set UseCertificateStore to true.

What OpenSSL command you have used to convert CSR and CER file into one PFX file?

In my case, I imported both of the files into Keychain access in macOS and exported them from there, which automatically generated a ,p12 file, which is effectively a .pfx file.

FYI I've updated the README with the instructions for Azure App Service deployment. I just created a brand-new web app and those were the only things I needed to change after publishing the code to get it running.

Here are the steps I followed to generate .p12 file:

Generated a CSR using Keychain
Uploaded this CSR in apple developer portal to generate merchant identifier certificate which generated 'merchant_id.cer' file.
In the Keychain, i have imported 'merchant_id.cer' file which is showing in 'Certificates' category in Keychain.
Under ' Keys' category in Keychain, i am able to see public key and private key for my merchant ID.
I right clicked on private key and clicked on Export. it generated ' myfile.p12'

Now i have 'MyFile.P12' should I run the openssl to covnert this into 'MyFIle.PFX' or should i directly use this 'MyFile.P12' in Azure to import?

If memory serves (I did this back in August last year), I just renamed the .p12 file to .pfx and that was it as they are the same. This blog post seems to agree with that.

I renamed the file and it got successfully added into Azure :)
I have also added the app settings values as per your instructions. Browsed the site but now showing error as 'Error
An error occurred. Sorry about that.'
Looks like the appsettings.json file issue. Can you please let me know what should be the values in appsettings.json after we imported the certificate and added the app settings in Azure?

If the overrides have been added into the Application settings tab correctly and saved in the Azure portal then it shouldn't matter what values are in appsettings.json as they will be overridden at runtime.
What error(s) are in the logs now? Alternatively you could try temporarily editing the Startup class to enable the developer exception page in production so you can see the stack trace.

Here is the log file details
warn: Microsoft.AspNetCore.Server.Kestrel[0]       Unable to bind to http://localhost:12581 on the IPv6 loopback interface. System.AggregateException: One or more errors occurred. (Error -4089 EAFNOSUPPORT address family not supported) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<StartAsync>b__8_0(Object state)    --- End of inner exception stack trace ---    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)    at System.Threading.Tasks.Task.Wait()    at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address)    at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication1 application)
---> (Inner Exception #0) Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.b__8_0(Object state)<---
Hosting environment: Production
Content root path: D:\home\site\wwwroot
Now listening on: http://localhost:12581
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.Extensions.DependencyInjection.DataProtectionServices[0]
Azure Web Sites environment detected. Using 'D:\home\ASP.NET\DataProtection-Keys' as key repository; keys will not be encrypted at rest.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 60.496ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 4878.0579ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 5327.9632ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 6.0874ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 356.4303ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 392.8599ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/favicon.ico
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/favicon.ico'. Physical path: 'D:\home\site\wwwroot\wwwroot\favicon.ico'
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 28.7818ms 200 image/x-icon
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 3.1732ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 3.1338ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 34.5052ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/favicon.ico
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/favicon.ico'. Physical path: 'D:\home\site\wwwroot\wwwroot\favicon.ico'
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 3.5798ms 200 image/x-icon
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 2.9235ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 3.5888ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 46.0937ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/favicon.ico
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/favicon.ico'. Physical path: 'D:\home\site\wwwroot\wwwroot\favicon.ico'
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 7.2835ms 200 image/x-icon
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 2.9664ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 3.8467ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 34.85ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Index (JustEat.ApplePayJS) in 7.9595ms
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
at JustEat.ApplePayJS.Controllers.HomeController.LoadMerchantCertificate() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 106
at JustEat.ApplePayJS.Controllers.HomeController.Index() in G:\ApplePayExample\src\ApplePayJS\Controllers\HomeController.cs:line 30
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.d__6.MoveNext()
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) with arguments ((null)) - ModelState is Valid
info: Microsoft.AspNetCore.Mvc.ViewFeatures.Internal.ViewResultExecutor[1]
Executing ViewResult, running view at path /Views/Shared/Error.cshtml.
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action JustEat.ApplePayJS.Controllers.HomeController.Error (JustEat.ApplePayJS) in 2.0616ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 53.3926ms 500 text/html; charset=utf-8
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/js/site.min.js?v=zfxevE97Q6RVhO1hwdWymHHbEO4BydzXwQaultRm7dw
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/js/site.min.js'. Physical path: 'D:\home\site\wwwroot\wwwroot\js\site.min.js'
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 6.1719ms 200 application/javascript
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://www.mywebsite.com/css/site.min.css?v=8A9EX90Wmb_HY7RXO-SqeCjeUiJLkBXaO1Fmwfe8RZM
info: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[2]
Sending file. Request path: '/css/site.min.css'. Physical path: 'D:\home\site\wwwroot\wwwroot\css\site.min.css'
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 2.5077ms 200 text/css
`
I think it is throwing exception ```
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Yeah from looking at the code it looks like it can't find the certificate. Have you definitely put in the right thumbprint for the certificate? For example, is there an accidental space or tab in the copied value?
I'll make a code change to make this clearer rather than blindly try and read out the certificate.

Got the error. The Thumbprint value had spaces in it. Removed the spaces and it worked :)
BINGO!!!!!!!!
You are Awesome. Can not appreciate more for your quick responses and help!

Excellent 👍, I'm glad we've finally got it working for you - I'm glad you've found this useful!
When I worked on an Apple Pay JS integration myself I had no code samples at all to work from, hence why this repository exists :)

I can completely understand how much pain you must have gone through during your first Apple Pay JS integration. This repository is definitely very useful for folks who are trying Apple Pay JS for the first time.
In fact i tried running EmporiumWeb on Azure but it also did not work. But your solution has helped immensely.
Keep in touch Bro! 👍

Hi Martin,
This is not related to your project but thought of checking with you. I am trying to host the below project on Azure:
https://github.com/rickschrader/PassbookWebApiService
I have installed the Pass Certificate the same way we did . But not sure how to install the Apple WWDR (WorldWide Developer Relations) certificate which is .CER format and it is not getting converted into PFX.
Can you please be able to load it and see if you are able to generate the pass successfully?
Your help on this would be much appreciated!
Thanks.

See comment in #7.

I tried to implement the same code in ASP.Net MVC (Not Core) because my company do not want it on Core. Please find the attached implementation. The issue i am getting is it is showing the action screen after clicking on 'Buy with Apple Pay'but showing processing circle continuously. I am sure this is merchant session validation issue. but not able to debug it. Your help is much appreciated sir!
PaymentApplePay.zip

I'm sorry, I don't have the time to help debug your alternate solution. I imagine that merchant validation is failing, so the merchant session is never returned to the JavaScript to enable TouchID. I suggest you add relevant logging to catch any exceptions in the controller and verify that your domain has been correctly validated and has a valid SSL certificate.

I figured out what the issue is with ASP.Net MVC with your code.
In order to make it work for ASP.NET MVC (without core) the following changes needs to be done in the Controller code.
`private HttpClient CreateHttpClient(X509Certificate2 certificate)
{
var handler = new WebRequestHandler();
handler.ClientCertificates.Add(certificate);
        var httpClient = new HttpClient(handler, true);

        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

        return httpClient;
    }

`
AND
Change the return statement in Validate Method
From
return Json(merchantSession);
To
return Content(merchantSession.ToString(Formatting.None), "application/json");

Hi Martin,
After successfully implementing the apple pay JS on my website, there is a new requirement which i am trying to research.
Be default apple pay JS uses Apple provided processors (mastercard, visa etc).
What if i want to implement payment processing my self with my own choice processors (like paymentch etc).
I looked at the following links
[https://developer.apple.com/library/content/ApplePay_Guide/ProcessPayment.html#//apple_ref/doc/uid/TP40014764-CH5-SW4]
[https://github.com/chengbo/ApplePayAndroidPayDecryption]
Looks like it is possible through APP.
Could you give some directions on how we can have server side decryption of payment token with Apple Pay JS?

Hi @sairaut, I have no experience of decrypting Apple Pay tokens, and we use PSPs to handle payments so don't decrypt them in our code either.
I'm sure there's stuff on StackOverflow and other resources showing how to do this with samples.


Serverless V4: Provider construct is not supported

Description
After updating to serverless v4 it throws an error on deployment/validation:
✖ Provider construct is not supported
Error: Provider construct is not supported
How to Reproduce

[...]

provider:
  name: aws
  region: eu-central-1
  [...]
  environment:
    SERVICE_NAME: ${self:service}
    REGION_NAME: ${aws:region}
    TABLE_NAME: ${construct:MyTable.tableName}  # this throws the error

constructs:
  MyTable:
    type: database/dynamodb-single-table
    extensions:
      table:
        Properties:
          TableName: ${self:service}-MyTable

Additional Information
The serverless.yaml still worked in v3.

Not ideal for anyone new to using the serverless framework. However v4 has had loads of breaking changes, and this package doesn't work out of the box anymore. We've had to pin serverless to the latest v3.


[Bug] - sonarr tba update script incorrect path / unable to locate series

With the most recent updated script, it's unable to locate the proper directory or find the series to update.  It looks like it's pulling the path in the container and not the path of the actual system.  For example, in sonarr I might have the path in the container point where
/NAS/TV = /share/data/TV
It's pulling the first directory /NAS/TV which does not exist in my system.  It needs the second path.
I manually changed this in the script to point to the correct directory but now every TBA comes back with unable to locate series.
Thanks in advance, these are great scripts!

Just to clarify, /NAS/TV is a virtual docker mount, and /share/data/TV is the physical path?
You're using sonarr in docker, and not bare metal install?
Also, what is your containerIp= line from your config?

Correct, I'm using docker and it's reading the virtual mount causing the error.  Even after hard coding the true directory in the script, it's able to locate any series to update.

If you're using Docker, it should be searching the virtual mount, from inside the container where that path will exist/be valid.
The script differentiates if it should use a physical path or a virtual mount inside the container by looking for the "docker:" prefix in your containerIp value. Specifically, line 618:
if [[ "${containerName%%:*}" == "docker" ]]; then

So containerIp=("docker:sonarr") tells the script to look at the virtual mount from inside the container, line 627:
docker exec "${containerName#docker:}" find "${i}" -type f -regextype egrep -regex "${findRegex}" | tr -d '\r' | sort

Versus if the value contains anything other than starting with that docker prefix, line 638:
find "${i}" -type f -regextype egrep -regex "${findRegex}" | tr -d '\r' | sort

Although I'm now realizing that for that second find command, I can drop the tr -d '\r' since Unix won't append that carriage return. But that's unrelated.
Assuming your docker container name is "sonarr", you can use containerIp=("docker:sonarr") and the script will get the virtual mount from Sonarr and then search that path from inside the container, where it does exist. If you're already using containerIp=("docker:sonarr") and it's unable to find your files with a hard coded path, then something is more wrong. In that case, set verbosity to 3 and send me the output of your script (you can use the email in my profile if you'd rather not paste it here).

I did have it set to docker:sonarr and it was telling me the directory didn't exist.  I'll set it to verbosity when I get home and let you know what the output is.  Thanks!

It appears to be working now.  Thanks for pointing me to those lines in the code.


Setting limits on worker threads in uwsgi causes raising ExaQueryError in export_to_pandas call within subprocess to get stuck

After making a custom build of py-exasol while adding changes to sys.executable (changes in repo: https://github.com/daschnerm/pyexasol/tree/master, based on discussion in issue: https://github.com/badoo/pyexasol/issues/73), we see that a subprocess spawned from the uwsgi server gets stuck while raising an ExaQueryError after calling export_to_pandas function. This problem is observed when we use the threads = x setting in uwsgi to limit the number of worker threads that get spawned by uwsgi.
Sample repro repro.tar.gz:

Extract contents in relevant directory
In subprocess_check.py add the necessary exasol credentials and make sure that the internal query tries to access an inexistent table in the database.
Start the server using the command:

uwsgi --ini {/path/to/uwsgi.ini} --set-placeholder PROCESSES=1 --set-placeholder THREADS=20 --set-placeholder APP_SER_SIZE=1024 --set-placeholder CWD={/path/to/app.py} --set-placeholder USER={your_user} --set-placeholder GROUP={group_relevant_to_USER} --set-placeholder LOG_PATH={/path/to/keep/uwsgi/logfile.log}

Run curl call:

curl http://<IP_ADDRESS>:9090/start

In case you receive a proper response, re-run step 4 a second time (this should normally cause the request to get stuck).

In case you need exasol logs, you can build the exasol from the following branch of the repo instead for debugging: https://github.com/daschnerm/pyexasol/tree/debugging.

Could you try to add option --enable-threads and remove limitations to number of threads altogether? Just let Python create as many threads as it wants to.
I suspect, you might be hitting "20 threads" limit due to WebSocket client background activity.
PyEXASOL uses only 1 extra thread to monitor the execution status of SQL query. But WebSockets require a lot of threads to read / write asynchronously, check timeouts and send / receive PING / PONG frames.

@littleK0i The original uwsgi.ini file that I used had --enable-threads. But one question, any reason why a sub-process is facing the thread limit? Shouldn't it be out of the limits set by uwsgi? Or is it because it inherits more than just the env vars and the sockets?

Well, technically when you create a new process in Linux, it "forks" and child inherits everything from parent. It includes all sockets, threads, resources, memory, almost everything. So I would not be surprised if thread limits are inherited as well.
Did it help to remove the limit?
I was thinking about creating a second implementation for HTTP transport, using threads only. No subprocess, no forking.

Removing the thread limit did work, but, we want to keep it since in our case we have limited cpus allocated to the server spawned and we want to limit the threads spawned to prevent any contention. On that note, within the same server process, we do have other thread pools that run as well, but they have never had any such problems. Or could it be that since these didn't have any problems as they aren't contending for any sockets?
On that note, to rephrase the problem, what I have been observing from the logs is that the HTTP transport thread that communicates with exasol does get created, but, the thread gets stuck at exception handling and joining.
Note: Just noticed that I didn't give you any logs from one of my tries. Big mistake on my part! Here it is:
PyEXASOL_20210909_035721_897429.log

I have a theory.
Maybe it gets stuck because it is unable to terminate subprocess due to this behaviour: https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html

Till uWSGI 2.1, by default, sending the SIGTERM signal to uWSGI means “brutally reload the stack” while the convention is to shut an application down on SIGTERM. To shutdown uWSGI use SIGINT or SIGQUIT instead. If you absolutely can not live with uWSGI being so disrespectful towards SIGTERM, by all means enable the die-on-term option. Fortunately, this bad choice has been fixed in uWSGI 2.1

PyEXASOL uses .terminate to send SIGTERM and stop the subprocess listening to data stream from EXPORT. If uwsgi overloads signal handlers for SIGTERM, it might be inherited by subprocess.

You may test it by replacing .terminate() call with .kill() here: https://github.com/badoo/pyexasol/blob/master/pyexasol/http_transport.py#L269

@littleK0i Thanks for the info. Will check and get back.

@littleK0i You were right with your theory, .kill() indeed works. @srikrbha tested the uWSGI flag die-on-term as well, however this did not work. Is there anything that speaks against exchanging .terminate() with kill() ?

It's possible to swap it with .kill(), but it's definitely not the best practice when we can terminate normally.
Could you try to reset SIGTERM signal handler to default? In order to do so, please the following code add after this line: https://github.com/badoo/pyexasol/blob/master/pyexasol_utils/http_transport.py#L236
import signal

signal.signal(signal.SIGTERM,signal.SIG_DFL)

It should reset signal handler to default, unless uWSGI added even more weirdness.

@daschnerm , @srikrbha
Indeed, child process inherits signals of parent process by design.
I've added reset of signal handler in 0.21.1. It should fix this specific problem.
Code: https://github.com/badoo/pyexasol/commit/7d2921456c740e755f5e96dc9a14dec8babc9713

@srikrbha , @daschnerm , If it is still relevant, please try to use pyexasol latest version (0.23.1+) with uWSGI.
HTTP transport was fully reworked to use threads instead of child processes. Subprocesses are no longer started. sys.executable, signal handling and many other problems should be resolved automatically.
We may see some new unforeseen problems related specifically to threads, but it is unlikely.
Thank you.

@srikrbha, @daschnerm: the last message from @littleK0i suggests that this ticket can be closed, right?

Closing ticket. No further feedback. Should be solved.


[Feature request] position of artbaords in slide

Hi Siddhartha... your plug in is a marvel and I'm going to be using it quite a bit as a way to create better hand-off documentation for sketch work.
A couple of suggestions for future features...

it would be GREAT if a plug-in user could set a preference to have the artboards export to Slides and display FLUSH RIGHT on a slide, rather than just flush left

would also be great to be able to bake in a top, side, and bottom margin for the artboard - rather than always have it display flush top and extend all the way to flush bottom.
Reason: as a freelance UX designer, I often have a need to create documents that have some degree of header and footer branding, and that is a bit challenging with the artbaords always displaying flush left and flush top.

Would absolutely love this. I just came here to add this feature request.
Dying to set a specific placement of the screens in my slides.
Thank you so much for your hard work on this plugin, it's amazing!


Add stack status tag to stack tiles

Lets add a tag on the tile that says incubator or experimental. I don't think we need to show a stable status but this is up for discussion.
We should discuss:

Where the tag should be put on the tile
Should the tag be shown of both flipped states?
Should the tag display if the stack is stable?

My preference would be to have the status bar just below the select button for now, possibly not on both sides, let's see how this looks with the stable label as well:
Add a screenshot below if you can :)

Something like this?

Updated

The second screenshot looks better, however, I'd like to explore the possibility of using graphic / icon to indicate this.

So I'm imagining that more stacks will be add in each category--"Stable", "Incubator", and "Experimental". With that in mind, what if we had a content switcher?

I don't think this is the right focus for how we improve the disclosure of available Stacks.
I'm worried just adds confusion on the first step, by introducing the concepts of stable/incubator/experimental without explaining what any of that means. Neither does it solve any issues of scalability as we look to grow the number of stacks available to folks.
This isnt a comment on any of the proposed designs/implementations, but a comment that this needs more discussion.

Closing this issue as work is being tracked here: #231


Don't select table row on a link click

Fixed https://github.com/kmmbvnr/material-pro/commit/6d8beb607face37ef3a616bdaa043bfd2e443a7c


Fixed log message for credential renewal

+1

+1 Nice catch.

Thanks @juanpaulo I merged into master, 1.x, 1.0.x branches.


Add palindrome-products exercise

This one was surprisingly tricky: getting the tests to pass was not that hard, but my solution was way too slow, it took almost a minute to run. Since Exercism rejects solutions that take more than ~20 seconds to run, I had to optimize my code. I managed to get it to run in less than a second, but unfortunately the code is now much less pleasant to read. In particular, the smallest and largest functions are very similar. I tried to factorize some things, but the code ended up being harder to read and understand, so it didn't really help, and I reverted to this version. I'm sure there must be a much better way to solve this exercise, but I didn't find it. Because of this, I set the difficulty to 6, even though getting the tests to pass initially isn't that hard. The difficulty is finding a clean and fast solution.

Maybe this is the approach you already tried, but it looks like it wouldn't be too bad to extract a common function that accepts a comparison function, increment function, and bestValue that could then be used by largest and smallest.
Either way, looks good!

Yes, that's what I tried, but it ended up making the code longer and less readable, unfortunately, probably because the functions differ in several little places. I chose to leave it as is, but if you manage to do better, I'd love to see it and we could update the solution. 👍


Docker image does not exist on docker hub

docker run skywinder/github-changelog-generator help
Unable to find image 'skywinder/github-changelog-generator:latest' locally
docker: Error response from daemon: pull access denied for skywinder/github-changelog-generator, repository does not exist or may require 'docker login'.
See 'docker run --help'.

@arekkas This is because it isn't yet finished.
Thanks for reminding. Closing this in favor of #591


Docs from querys

Hi,
is it possible to have the "save" function on the returning docs from the query function:
$scope.gbookdb.query("app", "utc_only", { include_docs: true, descending: true, limit: 8 });
My goal is to update docs that i have from the query without having to get the doc again by the Id to save it to database. I don't know if I can do this in some way, but i couldn't find it.
Thank you.

Hi, that is what the getQueryDoc(idx) methods (line 175 ff.) does. If the query result contains the complete docs, it will take that data and simply turn it into an object with approriatele prototype, so the save method can be chained onto it.


network interfaces: Reduce the start rate limit interval from 10 to 3 seconds

Motivation for this change
Sometimes, network connections fail a few times before they're stable. During boot, I don't want to have to wait 10 seconds in between attempting each phase of establishing a stable ethernet connection. So this lowers that.

Actually, "StartLimitIntervalSec = 3;" should also go into the "network-link-${i.name}" service in network-interfaces.nix, but the github web editor can't do that.

@spacekitteh When you have the branch (which you have since thats needed for pull requests), you can make additional commits and edit more files.
Be aware: when you only edit via web editor of github, your PR will most likely not fit this projects requirements: Multiple commits for one topic, no local execution of any tests and maybe some more…
So while I like the web editor of github, please give your PR better chances of acceptance by checking out your branch locally and testing it.

@spacekitteh What exactly is your problem here? Networking devices that are not yet available or just waiting for DHCP? In the latter case, dhcpcd would be the right place to change this. I don't think static configurations suffer from wait time at boot.

@fpletz I'm about 90% sure it's due to the device itself.

@spacekitteh Any update on this pull request?

Closing due to lack of activity, feel free to reopen this if needed.


Wrong fork, fuckdamnit.

Adds shitton of researches and recipes
Yipee.

Uhoh wrong fork.

goob moment


Reuse OC10 resource (code) as much as possible for OCIS

Description
Recently we have been shifting some spaces related tests from core to ocis. During the process we have been duplicating code on ocis which is already in core. So we need to mitigate the code duplication and use the already available code (already in core) for new implementation on ocis.
Note: Follow up this PR for reduction of code duplication.
https://github.com/owncloud/core/pull/40328
https://github.com/owncloud/ocis/pull/4492
NOTE:
Make possible code reduction related to the features that has been added during this issue:
https://github.com/owncloud/ocis/issues/4154#issuecomment-1206026045

TODO:
(Keep on adding features where you want to duplicate code if you find)

[ ] lockspaces.feature (@SagarGi )

@SagarGi can't we use core code for this also? https://github.com/owncloud/ocis/blob/b0fa917eae868b819f081290f6e0ab8159792d8b/tests/acceptance/features/bootstrap/SpacesContext.php#L520-L618

@amrita-shrestha i think we can but i think we cannot say its a duplicate code.

@amrita-shrestha i think we can but i think we cannot say its a duplicate code.

yeah but if we are reusing core code then why not properly implement it in overall ocis code?
I think it will be nice if you look over all ocis codes and check if there was pre-existing core code in ocis.

@amrita-shrestha i think we can but i think we cannot say its a duplicate code.

yeah but if we are reusing core code then why not properly implement it in overall ocis code? I think it will be nice if you look over all ocis codes and check if there was pre-existing core code in ocis. This way we can provide consistency in ocis code.

I'll take a look what can be done for this

I think I've reused as many tests as possible in https://github.com/owncloud/core/pull/40371 but if there are still other tests that can be reused that I might have left please take a look and mention here
@SagarGi @phil-davis @amrita-shrestha

@SwikritiT  can we also reuse for copy and move request? for (copySpaces.feature and moveSpaces.feature).

@SwikritiT can we also reuse for copy and move request? for (copySpaces.feature and moveSpaces.feature).

I'll take a look

https://github.com/owncloud/ocis/blob/28c631163df87e9d09ca31aedb98df2495abacea/tests/acceptance/features/apiSpaces/changingFilesShare.feature#L17
https://github.com/owncloud/ocis/blob/28c631163df87e9d09ca31aedb98df2495abacea/tests/acceptance/features/bootstrap/SpacesContext.php#L1590-L1648
This step contain some core code maybe we can remove that too

https://github.com/owncloud/ocis/blob/28c631163df87e9d09ca31aedb98df2495abacea/tests/acceptance/features/apiSpaces/changingFilesShare.feature#L17
https://github.com/owncloud/ocis/blob/28c631163df87e9d09ca31aedb98df2495abacea/tests/acceptance/features/bootstrap/SpacesContext.php#L1590-L1648
This step contain some core code maybe we can remove that too

We can reuse the code from the core for within space move or copy but form move in-between space, it's not possible through oc10 code so I don't think we should refactor these

@SwikritiT can you remove this method:
/**
	 * Send Propfind Request to Url
	 *
	 * @param  string $fullUrl
	 * @param  string $user
	 * @param  string $password
	 * @param  string $xRequestId
	 * @param  array  $headers
	 * @param mixed $body
	 *
	 * @return ResponseInterface
	 *
	 * @throws GuzzleException
	 */
	public function sendPropfindRequestToUrl(
		string $fullUrl,
		string $user,
		string $password,
		string $xRequestId = '',
		array $headers = [],
		$body = null
	): ResponseInterface {
		return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, 'PROPFIND', $user, $password, $headers, $body);
	}

and make a direct request in the method:
userListAllDeletedFilesInTrash```
May be we dont require the propfind method anymore since we are using it from `core`.

@SwikritiT can you remove this method:
/**
	 * Send Propfind Request to Url
	 *
	 * @param  string $fullUrl
	 * @param  string $user
	 * @param  string $password
	 * @param  string $xRequestId
	 * @param  array  $headers
	 * @param mixed $body
	 *
	 * @return ResponseInterface
	 *
	 * @throws GuzzleException
	 */
	public function sendPropfindRequestToUrl(
		string $fullUrl,
		string $user,
		string $password,
		string $xRequestId = '',
		array $headers = [],
		$body = null
	): ResponseInterface {
		return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, 'PROPFIND', $user, $password, $headers, $body);
	}

and make a direct request in the method:
userListAllDeletedFilesInTrash```
May be we dont require the propfind method anymore since we are using it from `core`.

Done in #4710

@SwikritiT I have scanned as much possible. I think we have reused lots of code from core. Can't really find out possible code to be reused. So may be this issue can be closed. @saw-jan @amrita-shrestha

I merged #4710 so this issue is done.


Updates globber

This change removes all directories (not just the root directory) as files to be included in artifacts which previously caused https://github.com/zgosalvez/github-actions-report-lcov/issues/195#issuecomment-2045319222


Are there any plans to support web? (js)

There is really a huge need for this in the KMP ecosystem

@slickorange Yes it's in roadmap, Please refer ReadMe section

@ctn-mobile-innovation Thanks, I did but the roadmap refers only to Desktop Support and I did not see anything about js

https://github.com/Chaintech-Network/ComposeMultiplatformMediaPlayer/issues/2


Link to spec is broken

This link is broken: C# Language Specification

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a60b6e17-36cf-bd6c-1b76-d38f1760a816
Version Independent ID: 0fdeaa81-c3c2-c290-224e-792fcee9b297
Content: C# reference
Content Source: docs/csharp/language-reference/index.md
Product: dotnet-csharp
Technology: csharp-language-reference
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

@konrad-jamrozik Can you please check if it's now fixed? The link in the article now works for me. This could have something to do with the recent movement from master to main.

Is this from the docs site or from the index md in this repo that you are finding this issue? Just to clarify, as for the docs site, it seems to be currently be working for myself.

@BenjaminMichaelis Yep the site was fixed in https://github.com/dotnet/docs/pull/23194

Closing as fixed in #23194


Powered by Gratipay interactive widget for signup and donation

Have a widget that groups can put on there site, that allows non-gratipay users to easily sign up and donate to that particular group all within their site.

I think Gratipay should be as prominent as it can without being annoying, and we can even have a button like "now go explore other projects to support!".
The current thing holding me back from moving a lot of catapultpgh members to gratipay, is that a lot of our base are not developers and I have had to spend 15 minutes onboarding people on to Gratipay to donate, which means lower donation rates not because people don't want to donate, but because they feel they it's very complex and confusing and they are signing up for some big thing when all they want to do is give catapult 10 bucks a months.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25635670-powered-by-gratipay-interactive-widget-for-signup-and-donation?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F85909&utm_medium=issues&utm_source=github).

I was thinking about something like this for a stint of time.  I see a lot of other companies using widgets/buttons on their Twitch streams.  Many other people would be interested if these buttons were introduced and the signup process was streamlined.

I like the idea of streamlining the registration/giving process while offsite.
Would it have to wait for https://github.com/gratipay/gratipay.com/issues/1052?

Closing a dupe of #1167. Will pick up over there ...


SLAM 3D using RoboSense Lidar

Hi koide3,
Thanks for your open source project.
I am trying to use hdl to perform an hand held slam with the 16 nap rslidar.
I have modified the hdl_graph_slam.launch you have provided but each time I launch it I receive below error :
[FATAL] [1585131902.225136372]: Failed to load nodelet '/prefiltering_nodeletof typehdl_graph_slam/PrefilteringNodeletto managerrslidar_nodelet_manager'
[prefiltering_nodelet-2] process has died [pid 9578, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load hdl_graph_slam/PrefilteringNodelet rslidar_nodelet_manager /rslidar_points:=/rslidar_points __name:=prefiltering_nodelet __log:=/home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/prefiltering_nodelet-2.log].
log file: /home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/prefiltering_nodelet-2*.log
[FATAL] [1585131902.496909072]: Failed to load nodelet '/hdl_graph_slam_nodeletof typehdl_graph_slam/HdlGraphSlamNodeletto managerrslidar_nodelet_manager'
[hdl_graph_slam_nodelet-4] process has died [pid 9585, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load hdl_graph_slam/HdlGraphSlamNodelet rslidar_nodelet_manager __name:=hdl_graph_slam_nodelet __log:=/home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/hdl_graph_slam_nodelet-4.log].
log file: /home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/hdl_graph_slam_nodelet-4*.log
[FATAL] [1585131902.753282107]: Failed to load nodelet '/scan_matching_odometry_nodeletof typehdl_graph_slam/ScanMatchingOdometryNodeletto managerrslidar_nodelet_manager'
[scan_matching_odometry_nodelet-3] process has died [pid 9579, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load hdl_graph_slam/ScanMatchingOdometryNodelet rslidar_nodelet_manager __name:=scan_matching_odometry_nodelet __log:=/home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/scan_matching_odometry_nodelet-3.log].
log file: /home/gabriel/.ros/log/196aa6d6-6e81-11ea-ab4f-40a3cc4085fd/scan_matching_odometry_nodelet-3*.log
Could you please help me understood why is it failing ?
I  am running it with ubuntu 18 and melodic and I have followed the instructions in the README to install hdl_graph_slam
Thanks

Hi @balletg ,
Please make sure that you have installed ros-melodic-nodelet.

Hi koide3,

Hi koide3
Indeed it was not installed on one of my two computers (the one on which the lidar is connected to) but I am still having the same issue anyway


Organize and add to PRODUCT_NAMES

Add some missing products

Actually, mind updating the changelog and version in config.cfg as well? That way we can just create a new release.


Odd breakpoint behavior

On chrome (50.0.2661.102) with v0.5.6, after hot reloading, breakpoints are dim (inactive) although they still stop execution, and I can't remove them by clicking on them. If I remove them from the breakpoints list, the line number (dimmed) markings are still there but the breakpoint doesn't stop execution. If I reload again, the breakpoints are active again (ignoring my removal of them before the reload).
Note that this doesn't happen when using jspm-server.

@Mosho1 I have seen this behaviour with react-hot-loader and webpack. As far as I am aware, this is either a chrome bug or working as intended-it might be some kind of limitation when debugger is working with sourcemaps. I am closing this for now, I don't think anyone outside or chrome team will be able to solve this one.

Anyone know where to post for Google team to take a look into this?
They are pretty responsive if we can just make them aware of the problem,
regards
Sean

Maybe chromium's issue tracker?
https://bugs.chromium.org/p/chromium/issues/list

tx posted: https://bugs.chromium.org/p/chromium/issues/detail?id=617450#


FourPhases CurrentState

Thank you for this library. 🙂
I implemented the FourPhase Button, but i didn't find an option to access the currentState of the Button. Is there an option to get the state of the Button (loading, success, error or lock)?

thank you, to be honest i forgot to set something like that because we change the current state ourself so we know what is the current state. can i know what is your usage?

Ok... Of course, the use case is to navigate to different ViewControllers depending on the current state of the Button.
Something like this:
@IBAction func pressedLoadyButton(_ sender: Any){ switch self.loadingButton.currentState { case .success: openThisVC() case .error: showErrorMessage() .... } }

update loady to 1.0.4, you can use currentState property which gives you a LoadyAnimationOptions.FourPhases.Phases.
      if case .normal(_, _ , _) = self.fourPhases.currentPhase {
               print("current phase is normal")
      }

Works perfectly. Thanks a lot for your amazing work!


Unify ColumnInfoSummary and ColumnViewModel

Data tab is currently storing 2 copies of column information.

ColumnSummaryInfo is the column purpose (text, categorical, ignore)
ColumnViewModel (stored in the DatasetColumnsViewModel) has the "type" - Feature, Predict, User, also Ignore.

This leads to terrible things, like when the header changes updating the column name in two lists. This should become a unified model when Jake's changes go through. I'm thinking ColumnSummaryInfo is the base type, which we extend to ColumnViewModel in the data tab. We can then pass on the ColumnSummaryInfo to the train tab.

This is gone!


Expose whether or not a floor's up/down button is illuminated

It would be handy to know whether or not a floor's up or down button is illuminated for making a decision in events like passing_floor. I could track it myself, but it's a pain especially since the simulation is clearly already tracking it. Right now I'm using floor.buttonStates.up/down, but I feel like that's cheating since it's not explicitly mentioned in the API.

A pair of methods like this would be a natural complement to the recently-added elevator.getPressedFloors method, which was added for #35 “Add direct way to get an array of pressed floor numbers”. I think this should be implemented for the same reason #35 was implemented.

When I was playing with the "passing_floor" event, I had expected "direction" to be the state of the illuminated buttons for the floor. I don't think that's as absurd as it sounds. The first argument is floorNum and I am already working with an elevator, so if I wanted the direction, then I just check elevator.destinationDirection().
@apaloma's comment is very helpful (thank you), it's very pertinent information that should be documented. I don't feel that's cheating nor is it hackish, rather it's expected information.

Can we please have this? It's hard to optimize with just the events because you have no idea when those floors have been satisfied.


[DOCS] addd a FAQ overview to the docs/readme

Which page or section is this issue related to?
We got some nice questions during our meetup that can be answered within a FAQ in the docs and readme.

What is Argilla?
Does Argilla train models?
Does Argilla host models?
Can Argilla only be used for LLMs?
Does Argilla provide annotation workforces?
Does Argilla cost money?
What is the difference between Argilla open source and Argilla Cloud?
How does Argilla differ from competitors like Snorkel, Prodigy and Scale?

This can be added in the docs at first.


add support for UserContext in sentry package

The package works great, but I haven't found a way
to pass a user context (user id, email, name)
like explained in https://docs.sentry.io/learn/context/#capturing-the-user

should be fixed by https://github.com/flutter/sentry/pull/17


testing: only enable the process monitoring in maintainer mode

Scope & Purpose
disable process monitoring thread in production arangosh'es.

this effectively makes this a complete non-feature, hence closing this PR.


Moc labs review patch 17

Module: 00
Lab/Demo: 00
Fixes # .
Changes proposed in this pull request:

Submitted by viggithub on behalf of MOC Labs Review


PowerShell build error due to variable naming

After AutoRest generation based on my team’s Swagger spec, the below build error occurs when running build-module.ps1
D:\a\1\s\src\ProviderHub\generated\api\Models\Api20201120\ProviderRegistrationPropertiesProviderHubMetadata.cs(6,9): error CS0535: 'ProviderRegistrationPropertiesProviderHubMetadata' does not implement interface member 'IProviderHubMetadata.ThirdPartyProviderAuthorizationAuthorizations' [D:\a\1\s\src\ProviderHub\Az.ProviderHub.csproj]
D:\a\1\s\src\ProviderHub\generated\api\Models\Api20201120\ProviderRegistrationPropertiesProviderHubMetadata.cs(7,9): error CS0738: 'ProviderRegistrationPropertiesProviderHubMetadata' does not implement interface member 'IProviderHubMetadataInternal.ThirdPartyProviderAuthorization'. 'ProviderRegistrationPropertiesProviderHubMetadata.ThirdPartyProviderAuthorization' cannot implement 'IProviderHubMetadataInternal.ThirdPartyProviderAuthorization' because it does not have the matching return type of 'IThirdPartyProviderAuthorization'. [D:\a\1\s\src\ProviderHub\Az.ProviderHub.csproj]
D:\a\1\s\src\ProviderHub\generated\api\Models\Api20201120\ProviderRegistrationPropertiesProviderHubMetadata.cs(7,9): error CS0535: 'ProviderRegistrationPropertiesProviderHubMetadata' does not implement interface member 'IProviderHubMetadataInternal.ThirdPartyProviderAuthorizationAuthorizations' [D:\a\1\s\src\ProviderHub\Az.ProviderHub.csproj]
Here is the link to the specific property in our Swagger:
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/providerhub/resource-manager/Microsoft.ProviderHub/stable/2020-11-20/providerhub.json#L3629
We have another property called “providerAuthorizations” and I noticed that if I change this field from “authorizations” to something other than authorization/providerAuthorizations there is no error during the build.

The issue should have been fixed in autorest.powershell v4.

@dolauli Where is v4?
I write a normal script like below
npm install -g "autorest"
autorest configuration.yaml

and autorest use version 3 like below
PS D:\Source\Repos\Resa\IpTables.Api\Source\BSN.IpTables.Cli> .\Generate-PowerShellClient.ps1

changed 1 package in 252ms
AutoRest code generation utility [cli version: 3.6.3; node: v18.15.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    |    Loading AutoRest core      'C:\Users\sooro\.autorest\@autorestcore@3.9.7\nodemodules\@autorest\core\dist' (3.9.7)
info    |
The default version of @autorest/powershell has been bumped from 2.1+ to 3.0+.
 > If you still want to use 2.1+ version, please specify it with --use<EMAIL_ADDRESS>e.g 2.1.401.

info    |    Loading AutoRest extension '@autorest/powershell' (~3.0.0->3.0.505)
info    |    Loading AutoRest extension '@autorest/modelerfour' (4.15.414->4.15.414)
verbose | [1.53 s] Reading OpenAPI 3.0 file file:///D:/Source/Repos/Resa/IpTables.Api/Source/BSN.IpTables.Api/swagger.json
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while.  Run with --verbose for more detail.
verbose | [1.74 s]   ModelerFour/api-version-mode:client
verbose | [1.74 s]   ModelerFour/api-version-parameter:constant
verbose | [1.74 s]   ModelerFour/use-model-namespace:false
info    | Autorest completed in 2.46s. 206 files generated.

related to https://github.com/BSVN/IpTables.Api/pull/22

I try to specify version be below code (as I learn from https://github.com/Azure/autorest/issues/2976)
use:
  - '<EMAIL_ADDRESS>

But I got below errors
The default version of @autorest/powershell has been bumped from 2.1+ to 3.0+.
 > If you still want to use 2.1+ version, please specify it with --use<EMAIL_ADDRESS>e.g 2.1.401.

error   |   Error: Unable to resolve package '<EMAIL_ADDRESS>error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
fatal   | Failed to install extension '@autorest/powershell' (4.0.0)

I found some workaround about that, with specific version in configuraiton.yaml as you can see in #1246 , But Did you know exist any better approach to using versoin 4.x?
thanks


Uncaught (in promise) URIError: URI malformed, problem with symbol "%"

there is a problem when uri contains symbol "%"
origin text is  increase 100%
after url encode increase%20100%25
so, when I try to open this url
obsidian://advanced-uri?vault=notes&daily=true&mode=append&data=increase%20100%25
it does't work
Uncaught (in promise) URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at AdvancedURI.eval (eval at <anonymous> (app.js:1), <anonymous>:3462:69)
    at step (eval at <anonymous> (app.js:1), <anonymous>:72:23)
    at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:53:53)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:46:71)
    at new Promise (<anonymous>)
    at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:42:12)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:3452:100)
    at t (app.js:1)
    at <anonymous>:1:52

I suggest you to use the built-in command to generate such URI. I think you have to encode it twice. I don't really know why, but instead of increase%20100%25 it has to be increase%2520100%2525

it seems to be increase%20100%2525 , not increase%2520100%2525
just the symbol % need to be encoded twice, I don't know why, weird……

Both work


use sentry/vue dedicated sdk

Issue #: /bcgov/entity###
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

/gcbrun


Update lambda_decorators.py

Chatted online, but recapping:
Problem: Implementing multiple LambdaDecorator subclasses with before() was only running through one of them.
Solution: In the __init__() method of LambdaDecorator, run the update_wrapper() function on the handler before assigning it to the self.handler of the class. I have no idea why this works, but it does.
Repro steps:

Add this file locally as handler.py:

import json
from lambda_decorators import LambdaDecorator

class structlogger(LambdaDecorator):
    def before(self, event, context):
        print('Doing structlog...')

        return event, context

class database(LambdaDecorator):
    def before(self, event, context):
        print('Doing database...')

        return event, context

@structlogger
@database
def hello(event, context):
    body = {
        "message": "Go Serverless v1.0! Your function executed successfully!",
        "input": event
    }

    response = {
        "statusCode": 200,
        "body": json.dumps({'message': 'Hello'})
    }

    return response

if __name__ == "__main__":
    hello("", "")

Curl the lambda-decorators file into your directory:

$ curl -O https://raw.githubusercontent.com/dschep/lambda-decorators/master/lambda_decorators.py

Run the file:

$ python handler.py
Doing structlog...

Notice that it only printed the statement from the first decorator.

Pull this file in, or swap lines 207 & 208 in lambda_decorators.py.

Run it again:

$ python handler.py
Doing structlog...
Doing database...

Both of them run 🤔

Fixed in ca0b7321a75fb5bc4f8a67f252dc12bdb10af9fb


Dr2 1555 ingest using the supplied checksum s algorithm

Conversion of checksum from a single value to a list

Changes in the DynamoFormatters, corresponding change in Read and Write and changes in tests.
Added test for when there could be more than one checksum.

The changes in reconciliation still assume only one fixity value from preservica. Further changes to make those to be multiple will follow in another PR

All comments were addressed and the changes merged into https://github.com/nationalarchives/dr2-ingest/pull/209
So this PR is stale, hence closing it


Default new user permissions

Idea Overview
The ability to set that new users should be created with a set of permissions (in my instance, requesting media)
Is your feature request related to a problem? Please describe.
At the moment I have a setup that has users login to Watcharr using Jellyfin, and Jellyfin then authenticates via LDAP to Authentik. This means to create a new user I just have to make them in Authentik. However, I want all my users to be able to request content by default (I, as I imagine many do, only run a small instance with close friends and family), which is currently not possible without going into Watcharr and adding the permissions as a secondary step.
Describe the solution you'd like
A set of default user permission toggles in the server settings that lets me specify the permissions of newly created users. For example, maybe something that looks like this;
New user permissions
Permissions that will automatically be applied to new users on signup

[ ] Admin
[x] Request Content
[ ] Auto Approve Requested Content

Describe alternatives you've considered
At the moment I run Jellyseerr as a separate instance that also has login via Jellyfin for requesting media - though think I could retire this as I prefer the Watcharr feature set.
Additional context
I believe a better way to solve this issue may be in some of the OAuth improvements on the Project board (for instance if I could sign in with Authentik and map directly from Authentik groups to Watcharr permissions or something like this that would be amazing) though I think that having default toggles will solve this minor pain point well enough for me and many other smaller setups.

Hi @tropics1999, thank you for making this suggestion. I think it makes a lot of sense to have a way to set default permissions for new users, I will get on this when possible (or anyone feel free to let me know if you'd like to work on this before I can get to it).


Fix NumPy v2 incompatible with OpenCV in tests

Our CI failed, because the version of OpenCV we're using in tests in incompatible with NumPy 2.0, so I downgraded to the last 1.x version of NumPy for tests.

I'll merge this now, because other PRs will fail otherwise.


Prisma crash in nested_read:97

Hi Prisma Team! My Prisma Client just crashed.  Happy to send whatever else you need. This seems to be happening somewhat randomly in production. It's happened twice now. Not sure what's triggering it. We restart our API and things go on their way for a day or two, and then more crashes. I'm going to upgrade to prisma 3.11 now in case that fixes it

Can you share the full error message?
Is it always the same query maybe?

Hey,
Since this issue has not seen any activity for the last 3 months, we'll close it now.
If you ever encounter this issue again or if you have any insights that could help us reproduce this issue, please let us know and re-open this issue.
Thanks for reporting 🙏


✨ support cache extension

Is your feature request related to a problem? Please describe.

Elegantly support cache

Additional context
refer to:

https://github.com/gin-contrib/cache
https://github.com/gofiber/fiber/tree/master/middleware/cache

please assign me, :)

please assign me, :)

thanks


Will FLA further speedup Mamba or Mamba2?

Hi,
Thanks for your great contributions.
Does FLA further speedup Mamba or Mamba2 in comparison with official Mamba or Mamba2 (https://github.com/state-spaces/mamba)?
or you use the official code of Mamba or Mamba2 in FLA, do you have any modification for speedup?
Looking forward to your feedback. Thanks!

FLA's implementations of mamba1-2 are based on huggingface transformers library.  Training speed should be similar to the official repo. Inference speed should be much slower (see https://github.com/state-spaces/mamba/issues/578). We currently have no plan to further optimize Mamba1-2 in FLA.

Anyway, thanks for your great contributions.


fix: remove support for runScript

Summary
It cannot be used for ESM anyways, so let's clean up our code a bit

Test plan
Green CI

Codecov Report

Merging #11155 (a999062) into master (fedafc3) will increase coverage by 0.02%.
The diff coverage is 30.00%.

@@            Coverage Diff             @@
##           master   #11155      +/-   ##
==========================================
+ Coverage   64.19%   64.21%   +0.02%
==========================================
  Files         307      307
  Lines       13372    13369       -3
  Branches     3260     3258       -2
==========================================
+ Hits         8584     8585       +1
+ Misses       4083     4081       -2
+ Partials      705      703       -2

Impacted Files
Coverage Δ

packages/jest-environment-node/src/index.ts
61.11% <ø> (+4.70%)
:arrow_up:

packages/jest-runner/src/runTest.ts
1.92% <0.00%> (-0.12%)
:arrow_down:

packages/jest-runtime/src/index.ts
55.76% <66.66%> (+0.17%)
:arrow_up:

packages/jest-environment-jsdom/src/index.ts
39.13% <100.00%> (+1.13%)
:arrow_up:

packages/expect/src/utils.ts
96.12% <0.00%> (+1.29%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fedafc3...a999062. Read the comment docs.

Will merge after we land the website update


Migrate DownloadFileshareArtifactsV0 task to Node10

Task name: DownloadFileshareArtifactsV0
Description: Migrated DownloadFileshareArtifactsV0 task to Node10

Execution handler is updated
Typings are deleted

Documentation changes required: N
Added unit tests: N
Attached related issue: N
Checklist:

[x] Task version was bumped
[x] Checked that applied changes work as expected

Test results:

Local shared folder - results
Not local shared folder - results

should I merge this?

@harshiniks would it be possible for you to test these changes also - to make sure that it's all fine? We've tested it for some simple scenarios, but it would be great to check on some more complex cases.

@harshiniks would it be possible for you to test these changes also - to make sure that it's all fine? We've tested it for some simple scenarios, but it would be great to check on some more complex cases.

@v-nmursapall  please do this and confirm when I should merge

cc @geekzter for visibility

Did a round of testing, looks good to me.


[MXNET-1453] Support the intput whose dimension is greater than 6 for Transpose and Rollaxis

Description
Fix #18695
Hi there, this PR supports the intput whose dimension is greater than 6 for Transpose and Rollaxis.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[x] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[x] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[x] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[x] Add a new function named TransposeExImpl to support inputs with 6+ dimenstions for transpose and rollaxis.
[x] Add a new function named TransposeCommonImpl, which is called in TransposeImpl and TransposeExImpl when ndim <= 6
[x] Add the attribute FResourceRequest for the extra workspace to store the argument axes
[x] Update the unittest for transpose(in mx.nd and mx.np) and rollaxis in mx.np.

how's the speed and memory consumption before and after the change? you can try this for speed benchmark and the memory profiler for memory consumption.

@szha Thank you for the suggestion!
When axes.ndim() <= 6, it will call the original function TransposeImpl. TransposeImpl does not allocate any workspace, and its speed is consistent with the original transpose.
I will use the profiler on transpose and rollaxis to test axes.ndim() <= 6 and axes.ndim() > 6.

Performance Benchmark:
transpose operator on CPU, axes is generated randomly

ndim
max use (kb)
avg time (ms)

1
12582.9121
1.0786

2
12582.9121
1.0851

3
12582.9121
0.6763

4
12582.9121
1.2172

5
12582.9121
6.4305

6
12582.9121
11.7841

7
12583.3604
65.7184

8
12583.4238
65.2171

9
12583.4883
82.4930

The increase of memory footprint is slight, but the time is intolerable when axes.ndim() > 6. I will try to optimize it.
Test Code:
import mxnet as mx
from mxnet import profiler
print(mx)
import numpy as np
from numpy.testing import assert_allclose
import time
import random
seed = 42
np.random.seed(seed)
mx.random.seed(seed)

#configure the profiler
profiler.set_config(profile_all=True, aggregate_stats=True, filename='trace_profile.json')
#start the profiler collecting data

def test_transpose(ndim):
    for t in range(20):
        dims = [4 for _ in range(ndim)]
        dims[-1] *= 4 ** (10 - ndim)
        axes = list(range(ndim))
        random.shuffle(axes)
        axes = tuple(axes)
        x = mx.nd.array(np.random.normal(size=dims))
        y = mx.nd.transpose(x, axes=axes)
        assert_allclose(np.transpose(x.asnumpy(), axes=axes), y.asnumpy())

for ndim in range(1, 10):
    profiler.set_state('run')
    tic = time.time()
    test_transpose(ndim)
    print(ndim, "====", time.time() - tic)
    #stop the profiler
    profiler.set_state('stop')
    #dump the profiling data as a string
    print(profiler.dumps(reset=True))
print("Over")

the comparison with numpy is unfair in that numpy just sets strides and doesn't have to be c contiguous.

@szha
In numpy, the output of np.transpose is not contiguous, but the copied ndarray is contiguous.
We compute each position of tranpose's output individually, but numpy computes them in blocks.
There is still an improvement space.


Update to kpro 4

Update to kpro 4

fix updates to field names
update to kpro 4 includes fixes for delete_topics field names

make ut is passing
make t is passing, except for any use of snappyer compress. Investigating, but any assistance would be appreciated.
Related to #69.

cc @zmstone

Also related: https://github.com/kafka4beam/brod/discussions/454

sorry for the late review @tpitale
could you rebase on latest master? we have fixed the CI there

Please help to update the TODO list in README.md

@zmstone

Should I remove the line about kafka protocol from the todos?
What version should be next in the changelog? 3.16.0 maybe?

@zmstone

Should I remove the line about kafka protocol from the todos
yes
What version should be next in the changelog? 3.16.0 maybe?
yes

@zmstone Made those changes. What do you think I should do with the snappyer errors?

@zmstone Made those changes. What do you think I should do with the snappyer errors?

sorry for the delay.
I pushed a commit to your branch.

thank you @tpitale
3.16.0 has been tagged and published to hex.pm.

Thank you!


[BUG] Modify the setting 'Allow Recurring Job While Volume Is Detached' note.

Describe the bug
Modify the setting 'Allow Recurring Job While Volume Is Detached' note from Note that during the time the volume was attached automatically, the volume is not ready for workload. to Note that the volume is not ready for workload during the period when the volume was automatically attached.

Environment:

Longhorn version: longhorn-master 10/14/2020

Verified with the master - f69c761
Validation - Pass


selector function defined outside useSelector's closure returns always initial state

What is the current behavior?
I would expect all the following selector function will lead to the same result, which is not true.
const outsideSelector = state => state.parameter // Whether imported or declared in same file
const outsideCreator = () => state => state.parameter

export const Component = () => {
  const insideSelector = state => state.parameter
  const inline = useSelector(state => state.parameter) // Re-runs with current state
  const inside = useSelector(insideSelector) // Re-runs with current state
  const outside = useSelector(outsideSelector) // always initial state on re-render
  const outsideC = useSelector(outsideCreator()) // Re-runs with current state
  ...

I would define it as bug, if this is not other possible it is minimum counter-intuitive and must be marked as bold in documentation and console out an error.
What is the expected behavior?
I would not expect any dependency on where a function is declared. The above functions are all pure.
Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using?  Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-redux": "^7.1.1",
"redux": "^4.0.4",

Can you provide a CodeSandbox that demonstrates the issues you're talking about?  Those should always be returning the same value - why do you say that outsideSelector is "returning initial state"?

Hmm I tried with new repo and all works as expected. Strange but so happy all are treat the same.