httpClient request authorization token header not working

What type of issue is this?
Question
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Target SharePoint environment
SharePoint Online
What browser(s) / client(s) have you tested

[ ] 💥 Internet Explorer
[X] 💥 Microsoft Edge
[X] 💥 Google Chrome
[ ] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[X] other (enter in the "Additional environment details" area below)

Additional environment details

Chrome Version 90.0.4430.93 (Official Build) (64-bit)
Edge Version 90.0.818.51 (Official build) (64-bit)
Node JS v10.24.0
SPFx 1.11.0
Gulp 3.9.1
NPM 6.14.11
React-devtools 4.10.1
Yo 3.1.1
Postman v8.3.0

Issue description
I am using the httpClient control to send a query to an AAD secured Azure function that calls an external API to retrieve an OAuth token, this token is then sent back to the SPFx webpart and stored in cache for a timeout period (or at least will be), Using this authorization token I am then trying to call the external 3rd party API using this authorization token in the header, however the http request that is sent is completely missing the "Authorization: Bearer xxxx" header
My code I am using is as below:
private GetToken(token: string): Promise {
   const postURL = "https://api.badgr.io/v2/issuers";
   const requestHeaders: Headers = new Headers();
   requestHeaders.append('Content-type', 'application/json');
   requestHeaders.append('Cache-Control', 'no-cache');
   requestHeaders.append('Authorization', 'Bearer '+token);
   const httpClientOptions: IHttpClientOptions = {
      headers: requestHeaders,
      method: "GET",
      mode: "no-cors"
   };
   console.log("About to make REST API request.");
   return this.context.httpClient.get(
      postURL,
      HttpClient.configurations.v1,
      httpClientOptions)
   .then((response: HttpClientResponse): Promise => {
      console.log("REST API response received.");
      if (response.ok) {
         return response.json();
      } else {
         alert('Badgr could not authenticate you!');
      }
   });
}

Calling the same exact headers to the API using Postman works fine, but whenever I try from within the webpart I get an unauthorized error because the authorization header is not being included in the request.
I thought maybe it was an issue with the Headers casting not working how it should so I tried including the header in the call code directly but this time the authorisation header is generated but the token is replaced with the text "Authorization"
Code:
return this.context.httpClient.get( postURL, HttpClient.configurations.v1, {headers: { 'Authorization': 'Bearer xxxxxxxxxxxxxxxxxxx' }, method: "GET", mode: "no-cors" })
.then((response: HttpClientResponse): Promise => {
console.log("REST API response received.");
 if (response.ok) {
        return response.json();
     } else {
        alert('Badgr could not authenticate you!');
     }
});

And with the Header casted to string[][] like this it just excludes the authorization header entirely:
return this.context.httpClient.get(
postURL,
HttpClient.configurations.v1,
{headers: [[
'Authorization', 'Bearer xxxxxxxxxxxxx'
]],
method: "GET",
mode: "no-cors"
})
.then((response: HttpClientResponse): Promise => {
console.log("REST API response received.");
     if (response.ok) {
        return response.json();
     } else {
        alert('Badgr could not authenticate you!');
     }
 });
}

This is the HTTP request from the browser with the Authorization header showing when I use the second code of directly adding the authorization header into the httpClient.get() code

All i want to do is include the authorization bearer token in the header message being sent so the request can be authorised by the third party API and a response can be received back, any guidance would be greatly appreciated as hitting a brick wall here.
edited by @andrewconnell - changed code listings from blockquotes => fenced. Please see How to Create Good Issues | Use code formatting (inline & blocks) for reference

Your 1st snippet has an error in the headers... you're submitting an HTTP GET but telling it what type of data you're sending (header=content-type)... that should be accept (what type of data you support in the response). The content type header only makes sense when you're submitting (POST/PUT/MERGE) to the endpoint. Further, there's no need to set the method in the request options... you're already doing that using the .get() method. Finally, if your endpoint can't authenticate, it won't respond with an "OK" (ie: 200)... so your else in your if statement will never get hit... because the response will be a 401/403.
Your 2nd snippet appears correct, but to help, need to see the exact request & response (from the browser's NETWORK tab).
Your 3rd snippet isn't valid... the request headers is an object that should be passed in & it contains name-value pairs, not an array.
Not sure what the screenshot is from... suggest replacing your first snippet with the following, then running it again, but look at the NETWORK tab in your browser's dev tools, and inspect the headers sent.
private GetToken(token: string): Promise {
   const postURL = "https://api.badgr.io/v2/issuers";
   const httpClientOptions: IHttpClientOptions = {
      headers: {
      'accept', 'application/json',
      'cache-control', 'no-cache',
      'authorization', 'Bearer '+token
     }
   };
   return this.context.httpClient.get(postURL, HttpClient.configurations.v1, httpClientOptions)
   .then((response: HttpClientResponse): Promise => {
      console.log("REST API response received.");
      if (response.ok) {
         return response.json();
      } else {
         alert('Badgr could not authenticate you!');
      }
   });
}```

Thank you @andrewconnell for taking the time to review and answer, you are right about the content-type header, it's copied from a previous post query I used and forgot to remove!
Technically none of the headers except for the authorization one are needed, even if I strip it down to bare minimal the authorization header is not included in the request that is sent (I had to modify the code you used slightly as headers need to be separated by colons not commas:
private GetToken(token: string): Promise<HttpClientResponse> {

    const postURL = "https://api.eu.badgr.io/v2/issuers";

    const httpClientOptions: IHttpClientOptions = {
      headers: {
        'authorization': 'Bearer '+token
      },
      mode: "no-cors",
    };

    console.log("About to make REST API request.");

    return this.context.httpClient.get(
      postURL,
      HttpClient.configurations.v1,
      httpClientOptions
      )
      .then((response: HttpClientResponse): Promise<HttpClientResponse> => {
        console.log("REST API response received.");

        if (response.ok) {
          return response.json();
      } else {
        alert('Badgr could not authenticate you!');
      }
      });
  }

But as you can see from the sent request there is no authorisation header included in it :(
I have to use the no-cors mode as the host is outside of the SharePoint domain, not sure if this is what's causing the issue here but then the whole point of the httpClient module is to allow anonymous 3rd party APIs to be called so wouldn't make much sense if we can't include authorisation headers in no-cors requests.
I have spent hours googling this and trying lots of different methods but have not had any luck, I have ended up doing all of the querying on the azure function and sending back the response from azure to the webpart but it all seems like a lot of overkill for what should work in SharePoint.
It would be good to know if this is a glitch with httpClient whilst in no-cors mode or if it's something else causing it.
As a workaround I have ended up building the full query in the Azure Function and passing the response back to SPFx but it means I can't take advantage of browser caching which is a shame
Azure code works fine but does have CORS enabled:
        var issuerClient = new HttpClient();
        issuerClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + e.access_token);

        var responseissuer = await issuerClient.GetAsync("https://api.eu.badgr.io/v2/issuers");

        var contentIssuer = await responseissuer.Content.ReadAsStringAsync();
        var f = JsonConvert.DeserializeObject<IssuerClass>(contentIssuer as string);

Hi @omarelanis - sorry for the long delay.
"mode": "no-cors" leads to this behavior. And this is default browser behavior, not something added by SPFx.
(You can test it by doing window.fetch).
If you're using no-cors you can set "safe" headers only. And authorization is not one of them.


Updates in Javadoc, config files and README

doc: updated modulith example dependencies in README
doc: updated package names in jqa adoc
finished package name refactoring #83: non-javadoc comments and logback.xmls

That's merged, thanks!


Fix export to JSON when dataset larger than batch size

Fix export to JSON when dataset larger than batch size.
Fix #7037.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

The test before confirms the bug.
There are different possible solutions to this issue:

the easiest would be to write multiple JSON files, one for each batch; this solution can be done in parallel if num_proc is passed
alternatively, we could tweak the writing and remove the extra [ and ] characters; this solution will only be valid if orient="records"
others?

I prefer the first solution.


optimizations for graph based algorithms

In the benchmark section for https://github.com/zilliztech/pyglass , i see pyglass performaing better than knowhere graph based algorithms ? Are there plans to port those optimizations to this code base ?
trying to understand what pyglass does different and if that code base in maintained ?

pyglass is an experimental product of our close-sourced index solution. Doesn't like our close sourced solution aiming for performance. Knowhere is an open-sourced ANNS adaptor, its goal is to adapt open-sourced 3rd party algorithm.
Also, some optimization on pyglass is benchmark orientated, but Knowhere is a production level lib. So we will not apply these strategies.


Add the full Apache LICENSE terms.

(I'm assuming this is the intended license for the whole repo. Apache2.0 in a LICENSE file is referenced by e.g. src/export_json.lean but previously doesn't look present.)

Ah, thanks for noticing this.
I just added the license through the GitHub menu, to make sure GitHub recognized it -- in the end it just made a new commit, so I think I could have saved time and just merged your PR!

All good!


Enable getting span locations

Hi David,
I needed a way to extract location of the unsafe code to make use of that in the CI harness, and came up with this approach to enabling that. Here is a simple repo to validate the fork works: https://github.com/kromych/unsafe_travels.

Found how to make this happen without re-exporting features


[FEAT] Add trace_level option to configure trace level separate from logs

feat(core)!: add trace_level option
feat(tracing)!: add trace_level option
feat(provider-sdk)!: configure observability with trace_level option
feat(host)!: configure observability with trace_level option
feat(wasmcloud)!: add --trace-level option

Feature or Problem
This PR adds a --trace-level option to wasmCloud which allows configuring traces and logging separately, defaulting trace level to DEBUG and log level to INFO. This should resolve an issue where you needed to set the log level to a fairly verbose level of debug in order to see many valuable traces.
Related Issues
Fixes #1932
Release Information
next minor tracing
next minor provider-sdk
next minor core
wasmcloud 1.1
Consumer Impact
This is a backwards compatible breaking change, and operators of wasmCloud should be aware that as of 1.1 the default trace verbosity will be at a debug level.
Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

This PR is a draft while I do some additional testing

Ah unfortunately my review isn't enough to merge this -- but there is a cargo fmt that needs to be run!

@thomastaylor312 I think I need a review from you here


Height of top bar plot in oncoprint

Hello,
Is there any way to specifically adjust the height of the top barplot in the oncoprint. When I want to plot a lot of genes in the oncoprint, I have to make the height of the PDF large enough, but this makes the top barplot really large too. And there is also a lot of whitespace as well. the main oncoprint doesn't adjust too well I think,

The older versions had better adjustments I think.

Thanks!

Hello,
I have included two arguments sepwd_genes and sepwd_samples which controls the width of the white grid lines. Decrease it to enhance the colours.
Unfortunately, the top bar plot (and rest) sizes are fixed and can't be changed :|

No problem. Thanks for trying to help out!

Did sepwd_genes and sepwd_samples help?


Validation

on socket authenticate, should check that the data.token exists and if it is the desired type?
socket.emit( 'authenticate', {token: {} }); // will crash server if sent from client-side.

Thank you, published as 4.3.3


[beta] There is an unexpected horizontal scrollbar on /donate

Describe the bug
There is an unexpected horizontal scrollbar on /donate.
The beta site is being down for maintenance at the moment. Here is a screenshot of my local fCC.

Desktop (please complete the following information):

OS: Windows 10
Browser: Firefox (66.0.5), Chrome (74.0.3729.169)

That there is. I'll take a look.


Is it possible to make the current user join a group by chat_id or group_id ?

I tried TdApi.AddChatMember / TdApi.JoinChat, but get an error
Error {
  code = 400
  message = "Chat not found"
}

here are some logs:
[ 3][t 3][1636601372.978558301][Td.cpp:3080][#1][!Td][&td_requests]	Receive request 5: GetChat {
  chatId = -751284850
}
[ 3][t 3][1636601372.978672266][MessagesManager.cpp:35500][#1][!GetChatRequest]	Failed to load chat -751284850 from database from load_dialog: Not found
[ 3][t 3][1636601372.978684425][RequestActor.h:111][#1][!GetChatRequest]	Receive error for query: [Error : 400 : Chat not found]
[ 3][t 3][1636601372.978690385][Td.cpp:4285][#1][!Td][&td_requests]	Sending error for request 5: Error { code = 400 message = "Chat not found" }
[ 4][t 3][1636601372.978696823][Td.cpp:3577][#1][!Td]	Decrease request actor count to 1
[ 3][t 0][1636601372.978702545][Client.cpp:284][&td_requests]	End to wait for updates, returning object 5<PHONE_NUMBER>38EB40
[ 3][t 0][1636601372.978717088][Client.cpp:276][&td_requests]	Begin to wait for updates with timeout 0.000000
[ 3][t 0][1636601372.978732109][Client.cpp:284][&td_requests]	End to wait for updates, returning object 0<PHONE_NUMBER>000000

I tried to get the information by chat_id and got the same error.
Whereas the same operation works fine when using another account that has been added to the target group.
It looks like some preemptive operation is needed to get the data corresponding to the chat_id to exist in the database first.

You can't use chat, user or any other identifier, unless you get it from TDLib. It is not possible to use an ID, which was never encountered. You need to use invite links to join chats or find the chat by some other means, before you can joit it with joinChat.

thanks


When did the sofa-tracer upgrade to the official 3.0.6 version, now the central warehouse does not have

Your question
describe your question clearly
Your scenes
describe your use scenes (why need this feature)
Your advice
describe the advice or solution you'd like
Environment

SOFATracer version:
JVM version (e.g. java -version):
OS version (e.g. uname -a):
Maven version:
IDE version:

@LightShine 本周 release


Ikea Tradfri on/off switch E1743 clicks not picked up in Domoticz

Issue description
Hi.
I have Ikea E1743 switch that supports these states, working fine in zigbee2mqtt:
hold pressed on:
{"linkquality":7,"last_seen":"2019-06-06T22:39:33+02:00","battery":100,"click":"brightness_up"}
hold pressed on released:
{"linkquality":0,"last_seen":"2019-06-06T22:39:34+02:00","battery":100,"click":"brightness_stop"}
click on:
{"linkquality":0,"last_seen":"2019-06-06T22:39:38+02:00","battery":100,"click":"on"}
click off:
{"linkquality":0,"last_seen":"2019-06-06T22:39:39+02:00","battery":100,"click":"off"}
hold pressed off:
{"linkquality":5,"last_seen":"2019-06-06T22:39:41+02:00","battery":100,"click":"brightness_down"}
hold pressed off released:
{"linkquality":5,"last_seen":"2019-06-06T22:39:42+02:00","battery":100,"click":"brightness_stop"}
This is not recognized in domoticz-zigbee2mqtt-plugin even though the button itself is.
When I click it, only the signal is published in domoticz in/out topic, switch is ignored:
{
"Battery" : 100,
"RSSI" : 1,
"description" : "",
"dtype" : "General",
"id" : "0x000d6ffffeba7aa5_signal",
"idx" : 114,
"name" : "Obyvacka/Vypinac/Svetlo/Signal",
"nvalue" : 0,
"stype" : "Custom Sensor",
"svalue1" : "0",
"unit" : 28
}
Additional information
Zigbee2MQTT version: 1.3.1
Python version: 3.7.3
Domoticz version: 4.10717
Plugin version: Not sure, where to get that from, nut I pulled today 6.6.2019, last commit: b7576b6
Let me know if you need additional info please.
Thanks.

Here is how I see the switch in devices page of Domoticz.

Are you sure you have E1743 switch, according to zigbee2mqtt device list it supports only on/off state?
https://www.zigbee2mqtt.io/information/supported_devices.html

That is what it says on the back. I believe that the supported devices list is not fully up to date. I wrote author of Zigbee2Mqtt about a new Ikea device working fine with his code and he updated the source code but not the documentation.

Simple on/off states are also not working

How to fix it? Should a new adapter be created that will create SelectorSwitch (on, off, brightness up / down / stop) instead of OnOffSwitch?

Existed adapter should be modified to properly handle device state and actions. Unfortunately I don't have such device to make and test these modifications.

I have the device and I am happy to help/test. Let me know what you need from me.

Running Zigbee2Mqtt 1.6
this switch give :
2019-09-21 22:33:18.152 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x90fd9ffffe663005 {'click': 'off', 'linkquality': 36, 'battery': 100}
2019-09-21 22:33:27.032 (Zigbee2MQTT) MQTT message: zigbee2mqtt/0x90fd9ffffe663005 {'click': 'on', 'linkquality': 60, 'battery': 100}
Actually widget only update Off Value
Generaly, it can be good to update Off/On even if widget is already Off or On
Goal : win some time and transforme this device to a simple physiqcal push using a script like :
if devicechanged('ikeaswitche1743') changed then
commandarray(my device) = 'Toggle'
usefull for night run when baby cry, just pres the button

I tried to create an adapter. It works well for me.  but i had to manually change the previously automatically created simple switch to selector switch. https://github.com/wini83/domoticz-zigbee2mqtt-plugin/blob/master/adapters/ikea/tradfri_switch_on_off.py

I have a samilar problem with Ikea E1743. I did the plugin update yesterday.
The widget was created on domoticz but it doesn't work. There is no reaction.
It's the same thing with TRADFRI motion sensor E1745.
However, i have no problem with KEA TRADFRI control outlet E1702, IKEA TRADFRI LED bulb E26/E27 and IKEA TRADFRI LED bulb GU10 LED1837R5.


Add unit test to PD 4.0.0 migration function

Overview
This will already be covered in E2E from #5369 but I wanted to add unit test coverage to 4_0_0.js migration.
This is a broken-out follow-up to #5373, I didn't want to do it there b/c #5369 is going to move the fixtures all around

This should be size 1 but is tricky due to labware definitions getting mocked out in jest, so need to find a solution to that so protocol in matches protocol out for a given labware load name


Add Passwordless SSH for root user

We need this to upgrade Weka.

Make sure you reverse this when you're done

I plan to add playbooks that we can run to enable/disable passwordless SSH for root. We will need this in the future when we have to upgrade again.

Can you add a thing where it leaves a note in the splash screen saying if we've left passwordless SHH on?  I just really really want to make sure it's off and we remember to turn it off. Open to other suggestions


Bokeh to mpld3

Change to mpld3 from Bokeh.
Things to do:

[ ] Issue #59 (this PR)
[ ] Issue #60 (whatever that is)
[ ] Implement all the previous functionality from Bokeh
[ ] Bonus: Issue #24 and #25.

We get the following error from the build:
TclError: no display name and no $DISPLAY environment variable

I think we should consider merging this into master. A lot of development has happened here which shouldn't have been developed here (but was due to us being a bit sloppy/lazy).


_axis and doaxis

What's going on with _axis and doaxis? My first reaction is they're aesthetically unappealing and they hint that something untoward might be happening underneath.

An alternative would be to define axplot() function and require axplot(scatter, fig[1,1], FPlot(...)) instead of scatter(fig[1,1], FPlot(...))

That's getting a bit heavy. Also I've been imagining the constant attributes like color=:red go in scatter(;...) whereas FPlot(;...) is supposed to take callable kwargs (not constants).

I guess you mean axplot(scatter, fig[1,1], FPlot(...); color=:red), then I withdraw that part of my comment.

Tbh I haven't been using the scatter(fig[1,1], ...) form. I normally use scatter(x,y) or scatter!(ax, x, y).

What's the benefit of the curried forms in 4 and 5 relative to 3?

I don't like this axplot(f)(xs...) thing but if you think it's temporary then ok I guess

axplot(scatter, ...) looks more idiomatic to me. Are there other examples of f(g)(xs...) interfaces in Julia? It's ok I don't feel too strongly it's just a bit unusual.
Is https://github.com/MakieOrg/Makie.jl/issues/1524 the issue?


BUG : Plane mirrors are reflecting from silvered surfaces.

Allow plane mirrors to reflect only from one side.
Moreover, grid snapping would be beneficial for accurate simulations.
Screenshot:

So should the rays that hit the backside just get absorbed? I think then I can add a "Double sided" checkbox that is disabled by default.

Also basic grid snapping exists if you enable "Show grid" and hold control while moving/rotating stuff.

So should the rays that hit the backside just get absorbed? I think then I can add a "Double sided" checkbox that is disabled by default.

Yes

Also basic grid snapping exists if you enable "Show grid" and hold control while moving/rotating stuff. Do you have any ideas for improvement?

Maybe add an option to enable snapping the entities to the nearest grid lines intersection, would be helpful for mobile devices. Very much needed for when measurements are at stake.

Maybe add an option to enable snapping the entities to the nearest grid lines intersection, would be helpful for mobile devices. Very much needed for when measurements are at stake.

Alright, that sounds good, I'll implement that.

This has been implemented in c10d46e.


extravagant, budged

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.4
logical conflict every: 100
sleep for: 300s
[pullrequest]
requests per hour: 30
deps=[b,e]

/trunk merge


feat: add ability to connect to bitcoind using inline credentials

Hey @casey!
I'm trying to use ord locally, within a containerized setup.
The cookie method is unfortunately not an option, was there a particular reason for not adding the user/pass strategy?
This PR was tested locally and is fixing my issue.
Thanks!

When running ord as a server, I think a common good practice devops is to pass environment variables, so instead of running:
$ ord -r --rpc-username admin --rpc-password password info

You'd pass
ord -r --rpc-username $BTC_RPC_USERNAME --rpc-password $BTC_RPC_PASSWORD info

Which works in this PR.
I think config files are great and complementary to command flags, but not designed either for solving secrets management issues.

If environment variables are preferred, than I'd be totally fine with a PR that caused ord check for those ORD_BITCOIND_RPC_USER and ORD_BITCOIND_RPC_PASS and use them directly, instead of needing to pass them. Would that be better?

Environment variables seem adequate for power users features (say ORD_DEBUG, etc) - poor discovery won't block new users to run ord.
If the cookie-file auth strategy is available through command flags, then other auth strategies should also be available via this interface.
From an ecosystem point of view, users running ord will also be running bitcoind so designing an experience consistent with bitcoind where env var could be reused could make a lot of sense:
$ bitcoind -help
  ...
RPC server options:
  ...

  -rpccookiefile=<loc>
       Location of the auth cookie. Relative paths will be prefixed by a
       net-specific datadir location. (default: data dir)

  -rpcpassword=<pw>
       Password for JSON-RPC connections

  -rpcuser=<user>
       Username for JSON-RPC connections

Agree on all points. I just want to prioritize specific use cases that specific users have. We eventually want a consistent, multi-layer interface for all config options, but for now, since username and pass are best left out of command line args for the reasons above, I want to make sure we implement better alternatives first.

Instead of taking these in from command line args, can they be parsed from the bitcoin.conf file?

Are there any recommendations for moving this PR along?

We added this check out PR https://github.com/casey/ord/pull/1527


User setting for controlling temporary tab

Is your feature request related to a problem? Please describe.
New document tabs overwrite existing ones by default. To prevent this, you have to remember to right click and select "new tab" every time.
Describe the solution you'd like
Add an setting to control whether new tabs are created by default.

FYI: Double click will open as a permanent tab, but this is also a good settings candidate.

Oh cool I didn't know that


presponder is listed in README as supported on OS X, but fails due to UIResponder reference

presponder is listed in the README as supported on OS X but using on OS X throws an error related to its reference to UIResponder in FBPrintCommands.py
Ex:
(lldb) p (BOOL)[self isKindOfClass:[NSResponder class]]
(BOOL) $3 = YES
(lldb) presponder self
error: error: use of undeclared identifier 'UIResponder'
error: 1 errors parsing expression
Traceback (most recent call last):
  File "/Users/matt/Documents/chisel-master/fblldb.py", line 79, in runCommand
    command.run(args, options)
  File "/Users/matt/Documents/chisel-master/commands/FBPrintCommands.py", line 179, in run
    if not fb.evaluateBooleanExpression('(BOOL)[(id)' + startResponder + ' isKindOfClass:[UIResponder class]]') and not fb.evaluateBooleanExpression('(BOOL)[(id)' + startResponder + ' isKindOfClass:[NSResponder class]]'):
  File "/Users/matt/Documents/chisel-master/fblldbbase.py", line 69, in evaluateBooleanExpression
    return (int(evaluateIntegerExpression('(BOOL)(' + expression + ')', printErrors)) != 0)
  File "/Users/matt/Documents/chisel-master/fblldbbase.py", line 61, in evaluateIntegerExpression
    output = evaluateExpression('(int)(' + expression + ')', printErrors).replace('\'', '')
AttributeError: 'NoneType' object has no attribute 'replace'
(lldb)

Note: Merely changing or removing the UIResponder reference in FBPrintCommands.py allows the presponder call to work as expected

Thanks! Sounds like an easy fix. Pull requests happily accepted 😄

Fixed by @kolinkrewinkel in #135.


instanceOfEcdsaSignature in SignerAlgorithm be of type any? [WARNING]

Current Behavior
I get this linter warning. I am not sure whether to call it a bug or an issue in the repository.
2:42  warning  Argument 'object' should be typed with a non-any type  @typescript-eslint/explicit-module-boundary-types
This is the equivalent code in your repository:
https://github.com/decentralized-identity/did-jwt/blob/master/src/SignerAlgorithm.ts#L4-L7
Steps to Reproduce
Here is what it looks like in Ubuntu on my fork [1]:
$ npm run lint

><EMAIL_ADDRESS>lint
> eslint --ignore-pattern "src/**/*.test.[jt]s" "src/**/*.[jt]s"

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.5.0

YOUR TYPESCRIPT VERSION: 4.5.4

Please only submit bug reports when using the officially supported version.

=============
jsxBracketSameLine is deprecated.

/home/ubuntu/Downloads/did-jwt/src/SignerAlg/common.ts
  2:42  warning  Argument 'object' should be typed with a non-any type  @typescript-eslint/explicit-module-boundary-types

✖ 1 problem (0 errors, 1 warning)

Environment
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic
[1] https://github.com/bshambaugh/did-jwt/blob/refactor/src/SignerAlg/common.ts

This is not a bug, that code is intentionally phrased that way since it has to deal with any data type.
I'm not sure why the comment above (// eslint-disable-next-line @typescript-eslint/no-explicit-any) doesn't disable the warning for you.
Closing this now, please reopen if you still have questions on this topic.


pause and resume the record if not streaming

Pause and resume record is not available for record. I will add this like feature.

waiting for that :)

Hi guys.. i personally get pieces of video and merge them.. when i press pause and then start again i record new video and when on stop i merge the pieces.
Though i had the idea to play with timestamps.. but couldnt achieve a good result :/

I'm working on it. For now, I have all working but when you resume produce pixelate effect because video need a new keyframe in first frame after resume. I'm working to solve it.

Pause and resume added: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/commit/379e6bbb613864636870593713be61d816cc88c3
I need test more and try find error but for now it is working.
This is not added to UI(because it is under test) so, if you want test It:

Go to OpenGlRtmpActivity.
In onClick method replace switch camera content to this code:

        if (rtmpCamera1.getRecordStatus() == RecordController.Status.RECORDING) {
          rtmpCamera1.pauseRecord();
        } else if (rtmpCamera1.getRecordStatus() == RecordController.Status.PAUSED) {
          rtmpCamera1.resumeRecord();
        }

Now, You can test it in my app.

Today while testing new Version got an error cause of the new pause - resume method.
Stopped video and got exception on 3thd line from the end
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
public void recordVideo(ByteBuffer videoBuffer, MediaCodec.BufferInfo videoInfo) {
if (status == Status.STARTED
&& videoInfo.flags == MediaCodec.BUFFER_FLAG_KEY_FRAME
&& videoFormat != null
&& audioFormat != null) {
videoTrack = mediaMuxer.addTrack(videoFormat);
audioTrack = mediaMuxer.addTrack(audioFormat);
mediaMuxer.start();
status = Status.RECORDING;
if (listener != null) listener.onStatusChange(status);
} else if (status == Status.RESUMED && videoInfo.flags == MediaCodec.BUFFER_FLAG_KEY_FRAME) {
status = Status.RECORDING;
if (listener != null) listener.onStatusChange(status);
}
if (status == Status.RECORDING) {
updateFormat(this.videoInfo, videoInfo);
mediaMuxer.writeSampleData(videoTrack, videoBuffer, this.videoInfo);  <--- THIS LINE HERE
}
}

Can you show me exception trace? (logcat) I want know exception reason.

Lost the log from android studio cause of cable reconnection.
Trying to reproduce it now.
:SSS


FATAL: delvewheel: Plugin issue while working on 'module 'scipy''. Please report the bug with the above traceback included.

In the template, I have made it clear, that not filling out the issue template is not acceptable. I am closing this kind of report as invalid. The main reason is that I do not want to be left guessing. For you it's easy to erase the issue template and expect me to ask you questions only as necessary, but I cannot do that. I would much rather wait for you to create a new report, fill out the template, or wait for somebody with the necessary skill to do it.
In short: No issue template, no fun. Therefore I am likely just deleting the issue, as it serves as a bad example and detraction for searches.  And even worse, it might keep good reporters from reporting as is this "already known."


More toStringDeep and toString tests.

These tests are a bit ugly but they've helped me catch a lot of edge cases in the pending
toStringDeep refactor I'm working on.


Update Text CFR Form

Title of ticket:
Description
It was observed during training that the first info bullet point for Producing records is incorrect, and should actually be moved to the Locating/Retrieving info bullet point - see highlighted bullet point in screenshot below. Users have also commented that the alignment of the tooltips are a bit off - shifting them upwards to more closely align with the first line of text should satisfy that. (eg - move tooltip for Locating/Retrieving to be on the same line as the text "Locating/Retrieving - This includes searching all relevant sources"

In addition - Electronic Estimated Pages, and Electronic Actual Pages should instead be:
Electronic Estimated Files
Electronic Actual Files
and the data entry window should be changed from pg(s) to file(s) for both

Dependencies
Are there any dependencies?
DOD

[x] Move the first bullet point in the producing tooltip, to the locating/retrieving tooltip
[x] Shift tooltips up - alignment can be somewhat confusing
[x] Update Text for Volume of Electronic Files in both estimate and actual fields

Updates made - closing.


Toelli/master

This contains the CI setup and benchmarks for Coconut and Knossos.  It's pretty uncontroversial but I'm happy to have other pairs of eyes on it if there are interested reviewers.
[Please merge by rebasing]

Closing temporarily whilst I adjust this

I'm going to move this branch to Azure DevOps.


Reorganize Library Overview layout by unifying sections

Partially solves for #62.

[x] Add references to ansys-templates

Recommend leaving the first two tasks for another PR, I've got a section to add to the guidelines.
Recommend merge.

No problem, merging this 🚀


Bug with tailwindcss-react-aria-components and group class

Provide a general summary of the issue here
Doing this

I get this class
.group:where([data-rac])[data-disabled] .group-\[\:not\(\[aria-valuenow\]\)\]\:w-1\/4 {
    background: red
}

And this is not since it's adding [data-disabled]
For example if i do it in tailwind i don't get that https://play.tailwindcss.com/CxjNxTGfBp
🤔 Expected Behavior?
https://play.tailwindcss.com/CxjNxTGfBp
😯 Current Behavior
.group:where([data-rac])[data-disabled]
💁 Possible Solution
Removing [data-disabled]
🔦 Context
No response
🖥 Steps to Reproduce

Version
     "tailwindcss-react-aria-components": "^1.0.0",         "react-aria": "^3.31.0",         "react-aria-components": "^1.0.0",

What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Mac OS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response

I've put your example in a codesandbox, and I'm not seeing the issue you mentioned: https://codesandbox.io/p/devbox/elastic-neco-xyjdy4
Outputted CSS: https://xyjdy4-1234.csb.app/index.2cdaf7bc.css

I've put your example in a codesandbox, and I'm not seeing the issue you mentioned: https://codesandbox.io/p/devbox/elastic-neco-xyjdy4
Outputted CSS: https://xyjdy4-1234.csb.app/index.2cdaf7bc.css

Here a simple repo where you can find the issue
Maybe it is related to NextJS?

@federicocappellotto97 I think you may have forgotten to include a link.

@federicocappellotto97 I think you may have forgotten to include a link.

Ops sorry ahah here it is: https://github.com/federicocappellotto97/adobe-react-spectrum-issues-5642

@federicocappellotto97 It doesn't look like that repo has react-aria-components or tailwindcss-react-aria-components installed.
Also, since you have that in a github repo, you can access a sandbox at this link: https://codesandbox.io/p/devbox/github/federicocappellotto97/adobe-react-spectrum-issues-5642/tree/main/

@federicocappellotto97 It doesn't look like that repo has react-aria-components or tailwindcss-react-aria-components installed.
Also, since you have that in a github repo, you can access a sandbox at this link: https://codesandbox.io/p/devbox/github/federicocappellotto97/adobe-react-spectrum-issues-5642/tree/main/

sorry again.. didn't pushed last changed, check now

Interesting... not sure why it would behave differently with that setup.


NTLM Auth attempt 2

This makes some changes to #714:

Moved some !Config.NtlmAccess() checks to lower level helper functions, so that every caller of these functions doesn't have to also check for ntml access.
Use a standard tracer message for toggleAuthType() so every caller doesn't have to define one.
Removed some ntlm specific helpers like isNtlmRequest(). Trying to remove as much ntlm special casing as possible.
Remove some spots where http response bodies are closed multiple times.
Automatically set ConcurrentTransfers() to 1 if ntlm authentication is used, so users aren't required to set this value themselves.
Removed some redundant internal helper functions in favor of the stdlib (ioutil.NopCloser() is pretty cool, for example).

@WillHipschman: Normally I'd just leave feedback for you to fix. But I didn't because the diff on #714 includes some changes in master that were made after the PR was opened. It made it really difficult to review. Seems like a GitHub PR issue, and nothing to do with your actual work.
There is still an ioutil.ReadAll() when cloning an http request, though. If NTLM auth is used for any file requests (as opposed to just LFS API requests), it should definitely buffer to a file instead. Maybe buffer up to 1MB in memory, and put the overflow in a temp file.

Trying to remove the ioutil.ReadAll() call was more difficult than I thought. It's in #821 by itself.

This looks good to me. Thanks for the changes :+1:


create db

The database structure is created (please also see the screenshots attached).

All the database structure and data are exported, committed to the https://github.com/ElenaNyiazova/FarmFood/blob/master/sql/farmfood.sql and deployed to Heroku.


[BUG]  sending docx file is broken

Hi All,
sending message with Docx file to WhatsApp number is not working.
Does somebody know if it's broken?
Thanks,
Matt

You're probably doing something wrong.


Proposal: gRPC Reflection Support

Summary
Server reflection is an optional gRPC feature for servers to assist clients in runtime construction of requests without having stub information precompiled into the client. With the user defined service, a predefined standard service is started to provide service information to the clients. This proposal discusses how to implement gRPC server reflection to the existing Ballerina gRPC implementation.
Goals
To add gRPC server reflection feature into the current Ballerina gRPC implementation.
Motivation
Currently, to interact with a Ballerina gRPC service, the client needs to have access the protobuf service definition. But with the reflection support debugging tools like gRPC CLI [1], gRPCurl [2] can talk to a Ballerina gRPC service without precompiled service information.
Description
Server reflection is a gRPC feature that allows clients such as command-line tools for debugging, to discover the protocol used by a gRPC server at run time. It provides information about publicly-accessible gRPC services on a server, and assists clients at runtime to construct RPC requests and responses without precompiled service information. This feature is currently implemented by most of the popular gRPC implementations [3, 4, 5].
For the implementation, there is an already defined protocol published here [6]. In both go and java reflection implementations, when a user needs to enable reflection in their service, they need to register another ServerReflection reflection service which will handle the reflection requests from external clients.
In Ballerina context, what we need to implement is, when a gRPC service is up and running, another ServerReflection service has to run attached to the same listener which listens to reflection requests from clients and respond with the service metadata.
The ServerReflection service has a bidirectional rpc method which accepts ServerReflectionRequest requests and responds with ServerReflectionResponse responses.
message ServerReflectionRequest {
  string host = 1;
  // To use reflection service, the client should set one of the following
  // fields in message_request. The server distinguishes requests by their
  // defined field and then handles them using corresponding methods.
  oneof message_request {
    // Find a proto file by the file name.
    string file_by_filename = 3;

    // Find the proto file that declares the given fully-qualified symbol name.
    // This field should be a fully-qualified symbol name
    // (e.g. <package>.<service>[.<method>] or <package>.<type>).
    string file_containing_symbol = 4;

    // Find the proto file which defines an extension extending the given
    // message type with the given field number.
    ExtensionRequest file_containing_extension = 5;

    // Finds the tag numbers used by all known extensions of the given message
    // type, and appends them to ExtensionNumberResponse in an undefined order.
    // Its corresponding method is best-effort: it's not guaranteed that the
    // reflection service will implement this method, and it's not guaranteed
    // that this method will provide all extensions. Returns
    // StatusCode::UNIMPLEMENTED if it's not implemented.
    // This field should be a fully-qualified type name. The format is
    // <package>.<type>
    string all_extension_numbers_of_type = 6;

    // List the full names of registered services. The content will not be
    // checked.
    string list_services = 7;
  }
}

message ServerReflectionResponse {
  string valid_host = 1;
  ServerReflectionRequest original_request = 2;
  // The server set one of the following fields accroding to the message_request
  // in the request.
  oneof message_response {
    // This message is used to answer file_by_filename, file_containing_symbol,
    // file_containing_extension requests with transitive dependencies. As
    // the repeated label is not allowed in oneof fields, we use a
    // FileDescriptorResponse message to encapsulate the repeated fields.
    // The reflection service is allowed to avoid sending FileDescriptorProtos
    // that were previously sent in response to earlier requests in the stream.
    FileDescriptorResponse file_descriptor_response = 4;

    // This message is used to answer all_extension_numbers_of_type requst.
    ExtensionNumberResponse all_extension_numbers_response = 5;

    // This message is used to answer list_services request.
    ListServiceResponse list_services_response = 6;

    // This message is used when an error occurs.
    ErrorResponse error_response = 7;
  }
}

This is a standard protobuf definition, and the complete service definition can be found here [7].
Since supporting reflection in a service is optional, user will be given a config to enable or disable server reflection in their listener.
public type ListenerConfiguration record {|
    string host = "<IP_ADDRESS>";
    ListenerSecureSocket? secureSocket = ();
    decimal timeout = DEFAULT_LISTENER_TIMEOUT;
    int maxInboundMessageSize = 4194304;
    boolean reflectionEnabled = false;
|};

If enabled, all the services attached to the listener will be reflected to external clients. In the runtime, a ServerReflection will be created dynamically which will handle the reflection requests and respond with the required metadata.
Testing
Since what reflection does is basically expose a gRPC service which communicates service metadata, we can test this using a simple Ballerina gRPC client. If it is needed, we can use the gRPC CLI [1] to test the implementation too.
Risks and Assumptions
Since all the services attached to a listener are exposed via reflection, internal services that are not needed to be exposed will also be exposed.
References
[1] https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md#grpc-command-line-tool
[2] https://github.com/fullstorydev/grpcurl
[3] https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection
[4] https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md#enable-server-reflection
[5] https://grpc.github.io/grpc/cpp/md_doc_server_reflection_tutorial.html
[6] https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
[7] https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto

Btw, since we are creating a dynamic reflection service, the generated ballerina stub file related to the reflection proto definition is stored in module level. Therefore, this will expose records like ServerReflectionResponse, ListServiceResponse, ErrorResponse and clients like ServerReflectionClient, ServerReflectionInfoStreamingClient to the user.
Will this be a problem?
FYA @daneshk @shafreenAnfar

Are we going to use these clients internally? If so can we make them private?

Are we going to use these clients internally? If so can we make them private?

Removed unused clients and added documentation specifying "These are used for internal reflection support"


Graduate ComponentConfig API version to beta

What would you like to be added:
I would like to graduate the config.kueue.x-k8s.io to v1beta1.
Why is this needed:
Currently, we use v1beta1 API for kueue.x-k8s.io (e.g., clusterQueue), and the API is production ready.
So it is better to graduate also config.kueue.x-k8s.io to beta API so that we declare the whole of Kueue is production ready.
Maybe, there is no need to make any breaking changes to the config.kueue.x-k8s.io, unlike when we migrated kueue.x-k8s.io from v1alpha2 to v1beta1.
Completion requirements:
This enhancement requires the following artifacts:

[ ] Design doc
[x] API change
[x] Docs update

The artifacts should be linked in subsequent comments.

cc: @kerthcet @alculquicondor

I think the config version has no strong correlation with the api version, but graduate to beta to mark it not in experiment seems necessary before we release v0.3?

I think the config version has no strong correlation with the api version,

I guess it's ok just to change the API version to v1beta1.

graduate to beta to mark it not in experiment seems necessary

Yes, it is worth it.

before we release v0.3?

I think it is better before we release v0.3.

We haven't had any changes, so it should be good to graduate.

Let me tackle this issue.
/assign


domain name

hi,
when installing to AWS instead of local, what domain name is one supposed to have ready??

@ivosanchez if you don't have your own domain name and won't be using it for production, you can use any (ex. mydomain.com). At the end of admin deployment, you'll be given an s3 link where you can access the admin site. Let me know how it goes.

hi. thanks for responding -- and for writing the software -- it's kind of great.     gonna try deployment in aws again in a bit, for now, I was able to make it work locally.  I  could not figure out that although does not complain during setup if you enter a password including a non-alphanumeric character such as '@' or '?' , it wont be able to fetch later during authentication in the backend.


[SUPPORT] Order rows with same key before precombine

I have an use case where I would like to use hudi. I have to process several inserts, updates and deletes indicated in a file. The file can have lots of rows for the same key and I have to combine it in order using a file. I have developed my own Payload but I can process the rows in order. I have used the options hoodie.datasource.write.precombine.field to indicate the precombine field and hoodie.payload.ordering.field to order by the same field but it didn't work.
Also, I have tested using repartition and sort functions in the spark code before saving hudi but it didn't work either.

Currently only internal HFile enables the sort of payloads within a file, for PARQUETs in the dataset table, the merge would break the sequence in anyway. Take https://github.com/apache/hudi/blob/6c6bddcef3ec383b08eb10f10ab0400f4edc41f4/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandleFactory.java#L54 for a reference.
I guess you might want to make the sorting configurable.


跨库搜索报错

Laravel Version: 5.5
PHP Version:7.1
Laravel-admin: 1.5.*

Description:跨库搜索报错
$filter->between('public_user_info.last_login_date','最后登录时间')->datetime();
···
class PublicUsers extends Model
{
protected $connection = 'user_mysql';
protected $table = 'users';
}
错误信息
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'laravel_reserved_0.id' in 'where clause' (SQL: select count(*) as aggregate from users where (exists (select * from userauthor where users.userid = userauthor.userid and name like %未知十%)) and exists (select * from users as laravel_reserved_0 where laravel_reserved_0.id = users.userid and last_login_date between 2018-03-01 00:00:00 and 2018-03-30 00:00:00))

试试表名前面加上数据库名：
protected $table = '数据库名.users';

thanks

大佬  帮我看看
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'zw_zw_usystem.user_wechat' doesn't exist


Fix agent ws hang on close when connection is unstable

Steps to reproduce:

start master & agent
pause master container
wait for agent to notice that master does not respond to ping
unpause master
agent ws connection is jammed

👍


BTC Deposit not working

Hi,
I made a BTC Deposit a while ago. 000711d609330585ab0144e003c3218d1cbf450839c3c943fcbcff3124010213 transaction id and confirmed in blockchain. How long will it take to get deposited>?

@manojaum I'll check

@manojaum will be deposited in 10-20 minutes


add the pubspec.yaml as an "invalidator" file

From https://github.com/exercism/dart-test-runner/pull/76#issuecomment-1948083625
for f in exercises/practice/*/.meta/config.json ; do
  echo $f
  jq '.files.invalidator = ["pubspec.yaml"]' $f | sponge $f
done

https://exercism.org/docs/building/tracks/practice-exercises#h-file-meta-config-json

invalidator: files that when changed, cause a solution to become out-of-date (optional)

@ErikSchierboom when this PR is merged, is it a "no important files changed" PR?

is it a "no important files changed" PR?

I'd add it to be sure.

Well, #534 ensures that bin/configlet create --practice-exercise $slug_name creates the .meta/config.json with the invalidator file. bin/create_exercise.dart does not create .meta/config.json, so I suppose the answer to your question is no.
I'll have a look at adding a call to bin/configlet create into the dart exercise creation script.


⚠ Secret Website 3 has degraded performance

In f66ee32, Secret Website 3 ($SECRET_WEBSITE_3) experienced degraded performance:

HTTP code: 200
Response time: 10729 ms

Resolved: Secret Website 3 performance has improved in 0254aa0 after 47 minutes.


Fastboot support

After the latest release I hopped, that this addon now has a fastboot support, but i get the following error: Error: Network error: XMLHttpRequest is not defined
I tried to set up a new ember app(2.16.0) with just ember-cli-fastboot(1.1.0) and ember-apollo-client(0.5.2) installed, but i still get the same error.

Do you have a sample app we can reference to help debug this?
On Sat, Oct 21, 2017 at 1:19 AM Christoph Wiedenmann <
<EMAIL_ADDRESS>wrote:

After the latest release I hopped, that this addon now has a fastboot
support, but i get the following error: Error: Network error:
XMLHttpRequest is not defined
I tried to set up a new ember app(2.16.0) with just
ember-cli-fastboot(1.1.0) and ember-apollo-client(0.5.2) installed, but i
still get the same error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bgentry/ember-apollo-client/issues/65, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAG9cb-3xJS82gbqDk7ZcWYE0L9k-KV0ks5suakpgaJpZM4QBe3R
.

I created a new repo with my small sample app. https://github.com/kennstenicht/ember-apollo-fastboot-test

@bgentry i have this error too. I tried use Apollo Fetch and integrate with ember-apollo, but I was not very successful. Do you have any idea how I am substituting XMLHttpRequest for fetch API in apollo-client?

@bgentry you have any suggestion for this problem with SSR?

I think this issue will be easier to address with Apollo Link after we update the addon to Apollo Client 2.0 - #54

I do not think so @viniciussbs, because the problem is the fastboot don't support XMLHttpRequest and Apollo Client 2.0  continues using XMLHttpRequest

@villander Apollo Client 2.0 relies on Apollo Link, that relies on Fetch. It deals better with global Fetch and let's you pass your on Fetch implementation.

Nice, we go start migration 🏎

Maybe something like this but inside the service should solve the fetch problem:
https://github.com/bgentry/ember-apollo-client/blob/master/tests/helpers/module-for-acceptance.js#L16-L20

@viniciussbs it's don't works, because SSR don't support browser API as window. What makes sense is to overwrite apollo's networkInterface or migrate to version 2.0
https://ember-fastboot.com/docs/addon-author-guide#common-causes

This was merged in #79. @villander created a sample fastboot app here: https://github.com/villander/ember-mvp
Check the readme for more info. Cheers 🍻


goto_location function

Hello
I'm in my third bachelor engineering technology. For my bachelorsassignment we have to write code for an autonomous flight test.
We're supposed to write a mission using some specific functions. One of the functions we miss is a 'goto_location' function.
Right now I'm trying to convert the distance in degree's between two coördinates into a distance in meters but I still get some errors.
I am using following code:
`
import math
"""radius of the Earth"""
r = 6373.0
class Waypoint():
def init(self, lat, lon):
self.lat = lat
self.lon = lon
async def distancelat(self, wp1, wp2):
    """LATITUDE"""
    self.wp1 = wp1
    self.wp2 = wp2
    lat1rad = math.radians(wp1.lat)
    lat2rad = math.radians(wp2.lat)

    # change in coordinates
    dlon = 0
    dlat = lat2rad - lat1rad
    # Haversine formula
    a1 = math.sin(dlat / 2) ** 2 + math.cos(lat1rad) * math.cos(lat2rad) * math.sin(dlon / 2) ** 2
    c1 = 2 * math.atan2(math.sqrt(a1), math.sqrt(1 - a1))
    distancelat = float(r * c1*1000)
    return distancelat

async def distancelon(self, wp1, wp2):
    """LONGITUDE"""
    self.wp1 = wp1
    self.wp2 = wp2
    lon1rad = math.radians(wp1.lon)
    lon2rad = math.radians(wp2.lon)
    lat1rad = math.radians(wp1.lat)
    lat2rad = math.radians(wp2.lat)

    # change in coordinates
    dlon = lon2rad - lon1rad
    dlat = 0
    # Haversine formula
    a = math.sin(dlat / 2) ** 2 + math.cos(lat1rad) * math.cos(lat2rad) * math.sin(dlon / 2) ** 2
    c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
    distancelong = float(r * c*1000)
    return distancelong

`
By using using the offboard function 'set_position_ned' I try to make the drone fly to it's new location.
wp1 = Waypoint(47.3977395, 8.5455929) wp2 = Waypoint(47.398039859999997, 8.5455725400000002) mnorth = Waypoint.distancelat(wp1, wp2) meast = Waypoint.distancelon(wp1, wp2) await drone.offboard.set_position_ned(     (PositionNedYaw(mnorth, meast, -5, 0)))
When trying to complete the mission I get the errors 'no RC and no offboard'. Another error I get is that parameter 'wp2' is ''unfilled''.
Is there any way i can solve this? Is there an easier option?
Hope to hear from you soon and thanks in advance
Katrijn Chys

goto_location will come in the next release, actually :-). And it should come very, very soon. Would that help?

Hello
Thank you for the quick answer.
The final presentation of our bachelors assignment is next Thursday but due to circumstances we were only able to start programming two weeks ago. I don't know if it will be in time for us, but it surely will be on time for the next group.
Is there  a way to request the coördinates of the launch position?
I also have a few question about the script 'mission.py'. I wasn't able to make the drone loiter above a waypoint. I entered this in the code:
mission_items.append(MissionItem(47.398039859999997,
8.5455725400000002,
3,
10,
False,
float('nan'),
float('nan'),
MissionItem.CameraAction.NONE,
float(30),
float('nan')))
When running the script I get this error.
[cid:8f9b94f7-388f-4b5e-a832-160c6c28bc9f]
What do I have to enter to make the drone loiter for 30 seconds above waypoint 2?
We have to make the drone fly from launch to waypoint 1, to waypoint 2, back to launch twice in a row without landing in between and with different altitudes. Is there a way to make the drone return to launch and not land?
Thanks in advance!
Katrijn Chys

Van: Jonas Vautherin<EMAIL_ADDRESS>Verzonden: dinsdag 5 mei 2020 17:11
Aan: mavlink/MAVSDK-Python
CC: Katrijn Chys; Author
Onderwerp: Re: [mavlink/MAVSDK-Python] goto_location function (#179)
goto_location will come in the next release, actually :-). And it should come very, very soon. Would that help?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-624114172, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APOXURIAKA7UI3JOLSCYAOTRQAUBVANCNFSM4MZSYJBQ.
[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-624114172", "url": "https://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-624114172", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

The error I get while running the script is ''Distance between waypoints too close: 0 meters''

Ok, got it. That's something to look into for me.

I have seen the "Distance between waypoints too close: 0 meters" issue recently (when working with MAVSDK-Java). The issue I had there was that my mavsdk_server was not up-to-date (I was using the latest protos for MAVSDK-Java).
@KatrijnChys: how do you install MAVSDK-Python? Using pip install?

To install it I opended settings in PyCharm and clicked the '+' under 'project interpreter'. Searched for 'mavsdk' and clicked on  'install package'.
This is how my teacher taught us.

I guess PyCharm is using pip under the hood. So that's fine.
Does mission.py work if you don't modify it at all?

When I run it without modifying it works perfectly. Also when adjusting the coördinates and altitude it workt great.

Right. So maybe @julianoes is right and MAVSDK is doing something weird with the loiter_time (I would guess something like adding an extra waypoint, which is refused by PX4).

MAVSDK-Python 0.7.0 is out, and contains goto_location(...)!
Regarding the loiter_time, @KatrijnChys would you mind trying again with the latest release and open a new issue if that's still failing?

?I'm currently having some troubles with connecting the drone to the code. I'm not able to run any scripts form examples. For example when running the mission.py script, I don't get any error's. I only get "Waiting for mavsdk_server to be ready...".
I tried reïnstalling the simulator and the mavsdk library but it still doesn't work.

Van: Jonas Vautherin<EMAIL_ADDRESS>Verzonden: woensdag 13 mei 2020 23:49
Aan: mavlink/MAVSDK-Python
CC: Katrijn Chys; Mention
Onderwerp: Re: [mavlink/MAVSDK-Python] goto_location function (#179)
MAVSDK-Python 0.7.0 is out, and contains goto_location(...)!
Regarding the loiter_time, @KatrijnChyshttps://github.com/KatrijnChys would you mind trying again with the latest release and open a new issue if that's still failing?

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-628263969, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APOXURI7I72X6THHZFG5AWTRRMIXXANCNFSM4MZSYJBQ.
[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-628263969", "url": "https://github.com/mavlink/MAVSDK-Python/issues/179#issuecomment-628263969", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

@KatrijnChys how are you starting mavsdk_server?
You now need to add the gRPC port mavsdk_server -p 50051.

@JonasVautherin @KatrijnChys

The error I get while running the script is ''Distance between waypoints too close: 0 meters''

I can reproduce that problem. I've created an issue: https://github.com/PX4/Firmware/issues/14904

@KatrijnChys how are you starting mavsdk_server?
You now need to add the gRPC port mavsdk_server -p 50051.

How do I add the gPRC port?

This is not related to goto_location, is it? Can  you open a new issue, explain your setup, and show us the code that opens the connection? We will answer there.

@julianoes In MAVSDK_Python I am using the goto_location function and it takes lat, lon, alt and yaw as params. So, I what I want is, I have to move the drone let's say 20ms north and 15ms west from current location, how to do that. Currently I am using a function to convert lat, lon into north and east, but it's not working as expected.
def get_location_offset_meters(original_location, dNorth, dEast, alt):
    earth_radius = 6378137.0 #Radius of "spherical" earth
    #Coordinate offsets in radians
    dLat = dNorth / earth_radius
    dLon = dEast / (earth_radius *math.cos(math.pi * original_location.latitude_deg / 180))

    #New position in decimal degrees
    new_lat = original_location.latitude_deg + (dLat * 180 / math.pi)
    new_lon = original_location.longitude_deg + (dLon * 180 / math.pi)
    new_alt = original_location.absolute_altitude_m + alt
    new_relative_alt = original_location.relative_altitude_m + alt
    return Position(new_lat, new_lon, new_alt, new_relative_alt)

could you please look into it?

@JonasVautherin didn't you write the code for these conversions somewhere at some point?

You mean this?
def global_from_local(north_m, east_m, ref_lat, ref_lon):
    world_radius_m = 6371000
    ref_lat_rad = math.pi / 180 * ref_lat
    ref_lon_rad = math.pi / 180 * ref_lon
    x_rad = north_m / world_radius_m
    y_rad = east_m / world_radius_m

    c = math.sqrt(x_rad * x_rad + y_rad * y_rad);

    if (c == 0):
        return ref_lat, ref_lon

    sin_c = math.sin(c)
    cos_c = math.cos(c)

    ref_sin_lat = math.sin(ref_lat_rad)
    ref_cos_lat = math.cos(ref_lat_rad)

    lat_rad = math.asin(cos_c * ref_sin_lat + (x_rad * sin_c * ref_cos_lat) / c)
    lon_rad = (ref_lon_rad + math.atan2(y_rad * sin_c, c * ref_cos_lat * cos_c - x_rad * ref_sin_lat * sin_c))

    global_lat = 180 / math.pi * lat_rad
    global_lon = 180 / math.pi * lon_rad

    return global_lat, global_lon

Yes :smile:

Hi, @julianoes Do we have this feature now in MavSDK Python?
I read the documentation and it says about "set_current_mission_item" method. But that method is only getting the index of the current mission, which should I do if I want to give the coordinates of the new location?

@MuhammadBilal1 yes: http://mavsdk-python-docs.s3-website.eu-central-1.amazonaws.com/plugins/action.html#mavsdk.action.Action.goto_location


Disallow illegal UnsafePointer conversions.

As proposed in SE-0107: UnsafeRawPointer.
https://github.com/apple/swift-evolution/blob/master/proposals/0107-unsaferawpointer.md
Remove the initializers that allow type inference to
change the Pointee type of an UnsafePointer.
These initializers violate the strict aliasing
aspect of the memory model and can lead to undefined
behavior.

Passes linux "build-script -R --llbuild --foundation --xctest -T"
and darwin validation tests.
Currently testing: build-script --playgroundlogger --playgroundsupport --xctest
@swift-ci Please smoke test.


Fix type cast error

Sorry! 🙈

Oof.  Thanks.

Done


add discriminator fields to accounts, ixs, and events

closes #4
In order to meet the requirements of 1, 2, 4, or 8 byte  discriminators, the representative hexadecimal strings in the IDL must be 2, 4, 8, or 16 characters long respectively. This is because Anchor generates the signature hash of the accounts, instructions, and events using SHA256 and then truncating the hashed bytes to the first 8. When converted to hexadecimal, each byte is represented as two characters ([0-9a-f]) resulting in a doubling of the sighash string length.
@seanyoung lmk if this is unexpected or does not work with the requirements outlined in the issue.
(also trimmed the sample IDL for the sake of brevity)

Wouldn't it make more sense for the discriminator to be an array of bytes
represented as integers?
"discriminator": [0, 2, 5, 1]

Arbitrary variable length, and easy to understand.

I think either format would work fine. I would say that the hex format is shorter, but folks favour array form then lets go with that.

adjusted to be a 1, 2, 4, or 8 byte numerical array with custom validation.


ccFormat bug when typing quickly

I found that in certain situations (not in your demos for some reason) - more specifically when using angular-material which I think has many more watches/formatters/parsers on the input directive, I can end up with the cursor  ending up in the wrong place as it incorrectly tries to move my cursor around.
I found I fixed this issue by changing the $watch for the ccFormat to have the following if statement:
(Line 65 of number.js)
if (formatted && (!formatted.charAt(selectionEnd - 1).trim() || formatted.length !== input.length)) {

Not sure if this will break things or not but it seemed to fix my issue.

Hmm. Not really sure what to do about this. Thanks for reporting it, but I'm not willing to add something like this without a better understanding of what's going on.

I think the issue was basically the watch doesn't fire immediately. So during typing the following is entered "4111222|", then the watch fires and adds the spaces, but for some reason it decides my caret should be back one space so the end result is this "4111 22|2". I also had the same issue using the backspace button as I'd end up skipping characters instead of spaces.

It fires asynchronously? If you can manage to send a PR that tests this I'm game.

I got it! It was the debounce effect - see here: http://plnkr.co/edit/PLZ6PqPc3cu0v9dqfnxW?p=preview
I ended up fixing it by replacing the actual watch with this:
$element.on('input', function formatInput () {
          	var input = $element.val();
          	var previous = $viewValue();
            if (!input) return
            var element = $element[0]
            var formatted = card.format(card.parse(input))

            //ngModel.$setViewValue(formatted)
            var selectionEnd = element.selectionEnd
            $element.val(formatted);
            //ngModel.$render()
            if (formatted && (!formatted.charAt(selectionEnd - 1).trim())) {
              if (previous && previous.length < formatted.length) {
                selectionEnd++
              } else {
                selectionEnd--
              }
            }
            element.setSelectionRange(selectionEnd, selectionEnd)
          })

Basically this fires before any of the watchers/formatters/parsers so it can't be delayed or intercepted without hooking into the input event again.


creating our post

Not ready to submit

@camazotz This looks good. I can't remember if we need to merge the request or just make it.
@eah13 Should we merge?

Your colnum-1 logic starts the column numbering at 1, whereas I had been thinking of columns starting at 0 for ease.  Both will work as long as the user knows what's what.
I'll merge these pair posts.


[watchers] Bug Download

[x] I've verified and I assure that I'm running youtube-dl 2017.05.01

Before submitting an issue make sure you have:

[x] At least skimmed through README and most notably FAQ and BUGS sections
[x] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

[x] Bug report (encountered problems with youtube-dl)
[ ] Site support request (request for adding support for a new site)
[ ] Feature request (request for a new functionality)
[ ] Question
[ ] Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):
youtube-dl -v http://watchers.to/embed-97wuzko82l6w.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://watchers.to/embed-97wuzko82l6w.html']
[debug] Encodings: locale cp1256, fs mbcs, out cp720, pref cp1256
[debug] youtube-dl version 2017.05.01
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: none
[debug] Proxy map: {}
[generic] embed-97wuzko82l6w: Requesting header
WARNING: Falling back on generic information extractor.
[generic] embed-97wuzko82l6w: Downloading webpage
[generic] embed-97wuzko82l6w: Extracting information
[generic] master: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpi8nwgst1\build\youtube_dl\extractor\common.py", line 498, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpi8nwgst1\build\youtube_dl\YoutubeDL.py", line 2106, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Single video: http://watchers.to/embed-97wuzko82l6w.html

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.

Description of your issue, suggested solution and other information
Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

Does not play in browser.


Maximal size of pixmap

There is a limit for a dimension in getPixmap https://github.com/adobe-photoshop/generator-core/blob/master/lib/jsx/getLayerPixmap.jsx#L51. When the layer exceeds this limit, it gets exported successfully, although pixmap is smaller and bounds are wrong. We found out that increasing this value fixes that problem and it works fine. My question is - does it have any reason why it is maxed at this particular value? And second one - can we increase it?

Well... that particular value isn't precisely important. uncompressed 10000 x 10000 RGB 8-bit images are quite large (280 MB) and the current architecture of generator-core requires that we hold 2 or 3 copies of this in Node's memory (depending on various parameters). When we first architected generator-core, Node v0.10.x was not yet out, and so there wasn't a streaming crypto implementation.
We should (and could) move to a streaming implementation which would greatly improve the memory footprint of the node process (and probably make things faster). But, there's a lot of QE involved in totally swapping out the pixel pipeline for generator, and so it hasn't gotten to the top of the priority queue.
Also, since generator was originally designed to export useable/useful portions of images (e.g. icon assets), it seemed that 10000px was a reasonable upper limit. Yes, there are definitely use cases where we'd like the limit to be higher.
Anyway, that's mostly explanation. How can we get around the problem? Well, in the short term, I would gladly welcome a PR that makes this limit settable in the generator.getLayerPixmap call. I'd want it to still default to 10000 pixels, though.
In the long term, streaming is the way to go. I started on it once, and there's actually a branch for this (jrb/streaming). That being said, a.) I don't think that branch will be helpful to anyone, and b.) the hard part is moving it through the "QEing and shipping PS" pipeline moreso than the initial implementation.
Hope that helps!

Thanks for the reaction. Yeah… the streaming again… as I said - I can help with the implementation. It's up on you to get it queued in some Photoshop release :)
I was mostly exporting images where dimension on one axis was particularly small and the other one exceeded the limit, so maybe that was why I didn't even noticed the higher memory usage. Anyway, for now I have created PR #288 for you to review and then it is up to streaming magic :sparkles: to solve this limitation systematically.

Closing as fixed by #288


The smoke-aws library fails to combine under linux* and Swift 5.6

Describe the bug
The smoke-aws library - specifically the ElasticContainerModel target - fails to combine under linux* and Swift 5.6.
Steps To Reproduce
Steps to reproduce the behavior:

Clone the smoke-aws repository - https://github.com/amzn/smoke-aws
Build the library using Swift 5.6 - for example

docker run --rm -v "$(pwd)":/workspace -w /workspace swift:5.6.2-amazonlinux2 bash -cl "swift package clean && swift build && swift test"

Compilation will fail with error: compile command failed due to signal 9 (use -v to see invocation)

Expected behavior
The code should compile successfully as with previous versions of Swift or on mac with Swift 5.6.
Environment (please fill out the following information)

OS: [e.g. macOS 11.0] amazonlinux2
Xcode Version/Tag/Branch: swift:5.6.2

Also confirmed this also occurs under swiftlang/swift:nightly-5.7-amazonlinux2.


next build shows warning about @prisma/debug: A Node.js API is used (process.stdout at line: 68) which is not supported in the Edge Runtime.

Bug description
When deploying the following project https://github.com/prisma/ecosystem-tests/tree/dev/driver-adapters-wasm/planetscale-vercel-nextjs-edgemw here is the output from next build with 10 warnings about @prisma/debug
[14:03:38.532] > next build
[14:03:38.532]
[14:03:39.214]   ▲ Next.js 14.2.3
[14:03:39.215]
[14:03:39.215]    Linting and checking validity of types ...
[14:03:39.420]    Creating an optimized production build ...
[14:03:46.546]  ⚠ Compiled with warnings
[14:03:46.546]
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.547] A Node.js API is used (process.stdout at line: 68) which is not supported in the Edge Runtime.
[14:03:46.547] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.547]
[14:03:46.547] Import trace for requested module:
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.547] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.547] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.547]
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.548] A Node.js API is used (process.stdout at line: 68) which is not supported in the Edge Runtime.
[14:03:46.548] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.548]
[14:03:46.548] Import trace for requested module:
[14:03:46.548] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.548] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.548] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.548]
[14:03:46.548] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.549] A Node.js API is used (process.stderr at line: 146) which is not supported in the Edge Runtime.
[14:03:46.549] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.549]
[14:03:46.549] Import trace for requested module:
[14:03:46.549] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.549] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.549] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.549]
[14:03:46.549] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.550] A Node.js API is used (process.stderr at line: 146) which is not supported in the Edge Runtime.
[14:03:46.550] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.550]
[14:03:46.550] Import trace for requested module:
[14:03:46.550] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.550] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.550] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.550]
[14:03:46.551] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.551] A Node.js API is used (process.stderr at line: 150) which is not supported in the Edge Runtime.
[14:03:46.551] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.551]
[14:03:46.551] Import trace for requested module:
[14:03:46.551] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.551] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.552] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.552]
[14:03:50.097]  ✓ Compiled successfully

Full logs
[14:03:18.885] Running build in Washington, D.C., USA (East) – iad1
[14:03:19.092] Retrieving list of deployment files...
[14:03:20.271] Downloading 13 deployment files...
[14:03:27.162] Restored build cache
[14:03:27.303] Running "vercel build"
[14:03:28.249] Vercel CLI 34.2.3
[14:03:29.279] Detected `pnpm-lock.yaml` version 6 generated by pnpm 8
[14:03:29.324] Installing dependencies...
[14:03:31.002] Lockfile is up to date, resolution step is skipped
[14:03:31.373] Progress: resolved 1, reused 0, downloaded 0, added 0
[14:03:31.528] Packages: +8 -8
[14:03:31.533] ++++++++--------
[14:03:32.389] Progress: resolved 8, reused 0, downloaded 0, added 0
[14:03:33.110] Progress: resolved 8, reused 0, downloaded 8, added 8, done
[14:03:33.646] .../node_modules/@prisma/engines postinstall$ node scripts/postinstall.js
[14:03:34.710] .../node_modules/@prisma/engines postinstall: Done
[14:03:34.827] .../node_modules/prisma preinstall$ node scripts/preinstall-entry.js
[14:03:34.876] .../node_modules/prisma preinstall: Done
[14:03:34.928] .../node_modules/@prisma/client postinstall$ node scripts/postinstall.js
[14:03:35.549] .../node_modules/@prisma/client postinstall: Prisma schema loaded from prisma/schema.prisma
[14:03:35.900] .../node_modules/@prisma/client postinstall: ✔ Generated Prisma Client (v5.15.0-dev.50) to ./node_modules/.pnpm/@prisma+client@5.15.0-dev.50_prisma@5.15.0-dev.50/node_modules/@prisma/client in 36ms
[14:03:35.900] .../node_modules/@prisma/client postinstall: Start using Prisma Client
[14:03:35.901] .../node_modules/@prisma/client postinstall: ```
[14:03:35.901] .../node_modules/@prisma/client postinstall: import { PrismaClient } from '@prisma/client'
[14:03:35.901] .../node_modules/@prisma/client postinstall: const prisma = new PrismaClient()
[14:03:35.901] .../node_modules/@prisma/client postinstall: ```
[14:03:35.901] .../node_modules/@prisma/client postinstall: More information: https://pris.ly/d/client
[14:03:35.902] .../node_modules/@prisma/client postinstall: ┌─────────────────────────────────────────────────────────────┐
[14:03:35.902] .../node_modules/@prisma/client postinstall: │  Deploying your app to serverless or edge functions?        │
[14:03:35.902] .../node_modules/@prisma/client postinstall: │  Try Prisma Accelerate for connection pooling and caching.  │
[14:03:35.902] .../node_modules/@prisma/client postinstall: │  https://pris.ly/cli/--accelerate                           │
[14:03:35.903] .../node_modules/@prisma/client postinstall: └─────────────────────────────────────────────────────────────┘
[14:03:36.101] .../node_modules/@prisma/client postinstall: Done
[14:03:36.306]
[14:03:36.306] dependencies:
[14:03:36.310] - @prisma/adapter-planetscale 5.15.0-dev.48
[14:03:36.311] + @prisma/adapter-planetscale 5.15.0-dev.50
[14:03:36.311] - @prisma/client 5.15.0-dev.48
[14:03:36.311] + @prisma/client 5.15.0-dev.50
[14:03:36.311]
[14:03:36.311] devDependencies:
[14:03:36.311] - prisma 5.15.0-dev.48
[14:03:36.311] + prisma 5.15.0-dev.50
[14:03:36.312]
[14:03:36.455]
[14:03:36.456] > planetscale-vercel-nextjs-edgemw@ postinstall /vercel/path0
[14:03:36.456] > prisma generate
[14:03:36.456]
[14:03:37.433] Prisma schema loaded from prisma/schema.prisma
[14:03:37.811]
[14:03:37.811] ✔ Generated Prisma Client (v5.15.0-dev.50) to ./node_modules/.pnpm/@prisma+client@5.15.0-dev.50_prisma@5.15.0-dev.50/node_modules/@prisma/client in 36ms
[14:03:37.811]
[14:03:37.811] Start using Prisma Client
[14:03:37.811] ```
[14:03:37.812] import { PrismaClient } from '@prisma/client'
[14:03:37.812] const prisma = new PrismaClient()
[14:03:37.812] ```
[14:03:37.812]
[14:03:37.812] More information: https://pris.ly/d/client
[14:03:37.812]
[14:03:37.812] ┌─────────────────────────────────────────────────────────────┐
[14:03:37.812] │  Deploying your app to serverless or edge functions?        │
[14:03:37.812] │  Try Prisma Accelerate for connection pooling and caching.  │
[14:03:37.812] │  https://pris.ly/cli/--accelerate                           │
[14:03:37.812] └─────────────────────────────────────────────────────────────┘
[14:03:37.812]
[14:03:38.011] Done in 8.6s
[14:03:38.031] Detected Next.js version: 14.2.3
[14:03:38.040] Running "pnpm run build"
[14:03:38.531]
[14:03:38.531] > planetscale-vercel-nextjs-edgemw@ build /vercel/path0
[14:03:38.532] > next build
[14:03:38.532]
[14:03:39.214]   ▲ Next.js 14.2.3
[14:03:39.215]
[14:03:39.215]    Linting and checking validity of types ...
[14:03:39.420]    Creating an optimized production build ...
[14:03:46.546]  ⚠ Compiled with warnings
[14:03:46.546]
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.547] A Node.js API is used (process.stdout at line: 68) which is not supported in the Edge Runtime.
[14:03:46.547] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.547]
[14:03:46.547] Import trace for requested module:
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.547] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.547] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.547]
[14:03:46.547] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.548] A Node.js API is used (process.stdout at line: 68) which is not supported in the Edge Runtime.
[14:03:46.548] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.548]
[14:03:46.548] Import trace for requested module:
[14:03:46.548] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.548] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.548] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.548]
[14:03:46.548] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.549] A Node.js API is used (process.stderr at line: 146) which is not supported in the Edge Runtime.
[14:03:46.549] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.549]
[14:03:46.549] Import trace for requested module:
[14:03:46.549] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.549] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.549] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.549]
[14:03:46.549] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.550] A Node.js API is used (process.stderr at line: 146) which is not supported in the Edge Runtime.
[14:03:46.550] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.550]
[14:03:46.550] Import trace for requested module:
[14:03:46.550] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.550] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.550] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.550]
[14:03:46.551] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.551] A Node.js API is used (process.stderr at line: 150) which is not supported in the Edge Runtime.
[14:03:46.551] Learn more: https://nextjs.org/docs/api-reference/edge-runtime
[14:03:46.551]
[14:03:46.551] Import trace for requested module:
[14:03:46.551] ./node_modules/.pnpm/@prisma+debug<EMAIL_ADDRESS>[14:03:46.551] ./node_modules/.pnpm/@prisma+driver-adapter-utils<EMAIL_ADDRESS>[14:03:46.552] ./node_modules/.pnpm/@prisma+adapter-planetscale@5.15.0-dev.50_@planetscale+database<EMAIL_ADDRESS>[14:03:46.552]
[14:03:50.097]  ✓ Compiled successfully
[14:03:50.098]    Collecting page data ...
[14:03:50.517]    Generating static pages (0/2) ...
[14:03:50.927]  ✓ Generating static pages (2/2)
[14:03:51.068]    Finalizing page optimization ...
[14:03:51.068]    Collecting build traces ...
[14:03:57.353]
[14:03:57.373] Route (pages)                             Size     First Load JS
[14:03:57.374] ┌ ○ /404                                  180 B          78.3 kB
[14:03:57.374] └ ƒ /api                                  0 B            78.1 kB
[14:03:57.374] + First Load JS shared by all             78.1 kB
[14:03:57.374]   ├ chunks/framework-a85322f027b40e20.js  45.2 kB
[14:03:57.374]   ├ chunks/main-d0d7919c01510df0.js       32 kB
[14:03:57.374]   └ other shared chunks (total)           906 B
[14:03:57.375]
[14:03:57.375] ƒ Middleware                              71.9 kB
[14:03:57.375]
[14:03:57.375] ○  (Static)   prerendered as static content
[14:03:57.375] ƒ  (Dynamic)  server-rendered on demand
[14:03:57.375]
[14:03:57.459] Traced Next.js server files in: 36.518ms
[14:03:57.496] Created all serverless functions in: 36.382ms
[14:03:57.708] Collected static files (public/, static/, .next/static): 2.745ms
[14:03:57.732] Build Completed in /vercel/output [29s]
[14:03:57.839] Deploying outputs...
[14:03:57.840] Injected preview comments into the build output, you can disable this in your project settings.
[14:04:06.237]
[14:04:06.681] Deployment completed
[14:04:13.605] Uploading build cache [131.59 MB]...
[14:04:17.284] Build cache uploaded: 3.679s

How to reproduce

Deploy https://github.com/prisma/ecosystem-tests/tree/dev/driver-adapters-wasm/planetscale-vercel-nextjs-edgemw
Check the build logs on Vercel

Expected behavior
No warning, or at least, less warnings.
Prisma information

Environment & setup

OS:
Database:
Node.js version:

Prisma Version
prisma                  : 5.15.0-dev.50
@prisma/client          : 5.15.0-dev.50
Computed binaryTarget   : darwin-arm64
Operating System        : darwin
Architecture            : arm64
Node.js                 : v20.14.0
Query Engine (Node-API) : libquery-engine 64bb6b95cbf89b742d0a4cbcbebffc973942e7ad (at node_modules/.pnpm/@prisma+engines<EMAIL_ADDRESS>Schema Engine           : schema-engine-cli 64bb6b95cbf89b742d0a4cbcbebffc973942e7ad (at node_modules/.pnpm/@prisma+engines@5.15.0-dev.50/node_modules/@prisma/engines/schema-engine-darwin-arm64)
Schema Wasm             : @prisma/prisma-schema-wasm 5.15.0-16.64bb6b95cbf89b742d0a4cbcbebffc973942e7ad
Default Engines Hash    : 64bb6b95cbf89b742d0a4cbcbebffc973942e7ad
Studio                  : 0.500.0
Preview Features        : driverAdapters

are there any updates on this? having the same issue, using neondb driver adapter

The source code should be https://github.com/prisma/prisma/blob/bb3efede3a584f78522ea4509288eab9dc3c24f8/packages/debug/src/index.ts#L66-L84
@colenh This warning can be safely ignored, it's only a warning from Next.js which detected process.stderr in the code but it would not be used once deployed because it would not exist and the conditions would catch that and switch to console.warn or log

These warnings appear because Next.js is leveraging Webpack Compiler Hooks to monitor when process.* methods are used: https://github.com/vercel/next.js/blob/303d155c08a343ca9c45c80be216417bbe7a0cc2/packages/next/src/build/webpack/plugins/middleware-plugin.ts#L368-L370.
To avoid warnings, we could conditionally import our own Vercel Edge-compatible debug module (without any dependency on process), and fall back to using process.stderr for other runtimes.

The problem still exists when using @prisma/adapter-neon.

Same issue

@jkomyno, would you like a new issue for the @prisma/adapter-neon package? I was running into that one as well.

@jkomyno, would you like a new issue for the @prisma/adapter-neon package? I was running into that one as well.

No thanks. Honestly, this issue shouldn't even live within prisma/prisma, as it's triggered by Next.js + Webpack.
In particular, Webpack statistically inspects even parts of the codebase that are conditionally excluded from running in Vercel Edge environments, causing this warning.
Please raise an issue in https://github.com/vercel/next.js, thanks.
cc @Mnigos @vinkovsky


[Code health] Fixes and cleanup of LocalMutationSyncWorker

Code health improvements which came up while fixing #2129:
Recommended:

[ ] Warn and ignore mutations not belonging to current signed in user
[ ] Stop marking all mutations for an LOI as IN_PROGRESS at once. Instead, process each mutation individually, and set IN_PROGRESS before actually processing.
[ ] Wrap remoteDataStore.applyMutations in behind LocationOfInterestRepository and SubmissionRepository.
[ ] #2236
[ ] Abort updates to this LOI if any mutations were unsuccessful

Nice to have:

[ ] Log an error if "create" submissions were enqueued after "edit" submissions
[ ] Replace MutationRepository.markAs.. methods with saveMutationsLocally and helper on Mutation
[ ] Improve naming of finalizePendingMutationsForMediaUpload()
[ ] Return updated mutation rather than boolean from process* methods
[ ] Only call enqueueSyncWorker() if media uploads are pending for this LOI
[ ] Extract business logic into UserDataUploadUseCase
[ ] Move getPendingOrEligibleFailedMutations() into repository

@scolsen Breaking these out so we can keep moving forward

https://github.com/google/ground-android/pull/2237 will take care of:

Warn and ignore mutations not belonging to current signed in user
Move getPendingOrEligibleFailedMutations() into repository


You may dive into the testing method to get the class probabilities. See here for details.

You may dive into the testing method to get the class probabilities. See here for details.
Originally posted by @hellock in https://github.com/open-mmlab/mmdetection/issues/958#issuecomment-510369504
Hi hellock!  when i open the 'here'  page  is  lost. can you  help me where can i looking for it?

It should be here

Duplicate #3755


Not working in RecyclerView

The library seems excellent but it is just broken when used in RecyclerView as shown in the video. The list becomes very unstable and does not show the correct text and glitches around.
https://user-images.githubusercontent.com/46769766/181864997-5b36cf66-9496-4520-9185-348500c613e9.mp4
Moreover, the app crashes after scrolling up and down for a few seconds.
2022-07-30 02:20:19.547 19214-19214/com.application.app E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.application.app, PID: 19214
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
        at java.lang.String.substring(String.java:2064)
        at java.lang.String.subSequence(String.java:2107)
        at com.erif.readmoretextview.TextViewReadMore.onDraw(TextViewReadMore.java:135)
        at android.view.View.draw(View.java:22704)
        at android.view.View.updateDisplayListIfDirty(View.java:21579)

Hi, thanks for the feedback and helping me to test this library.  I will fix it as soon as possible.  Thanks again 🙏🙏

I am very happy with your feedback.

You're welcome. I forgot to mention that "Read more" text shows twice after clicking on it. You can see it in the video.

Hi ilyassesalama, I've been updated my library, please check it and please give feedback again if you still have problems. Thank you

It seems like you used setItemViewCacheSize and that's definitely a bad idea for a list that is updated in realtime (chat app for instance). As well as it will affect the RecyclerView performance.

Hi ilyassesalama, I've been updated my library, please check it and please give feedback again if you still have problems. Thank you

The app now only crashes, I can't test the library as before anymore.
java.lang.ArrayIndexOutOfBoundsException: length=15; index=20
        at android.text.StaticLayout.getEllipsisCount(StaticLayout.java:1341)
        at com.erif.readmoretextview.TextViewReadMore.isEllipsized(TextViewReadMore.java:194)
        at com.erif.readmoretextview.TextViewReadMore.buildSpan(TextViewReadMore.java:155)
        at com.erif.readmoretextview.TextViewReadMore.onMeasure(TextViewReadMore.java:149)
        at android.view.View.measure(View.java:25833)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
        at android.view.View.measure(View.java:25833)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6980)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
        at android.view.View.measure(View.java:25833)

Also, why the library's minSdk is 23 and not 21?

Hi ilyassesalama, Can i see your xml code for showing this TextView ?

Hi ilyassesalama, I've been updated my library, please check it and please give feedback again if you still have problems. Now min sdk is 21. Thank you.

It's nice that you're dedicated to working on this library. The latest update seems to be working well, but I noticed a few bugs.

Sometimes the TextView shows 2 lines instead of 3 (maxLines).
Read more/Close text doesn't have a space to separate itself from the original text.
The animation is a bit unstable, I think you can't control that but it'd be great to add an attribute to disable the animation.

https://user-images.githubusercontent.com/46769766/183475014-4883d8dc-afb3-4972-89ae-390c07ca4c78.mp4
Also, what is item.isCollapsed() in the docs? I think it's to save the collapse state, but how does it work exactly?
If you would like not to release a buggy version every time, you can contact me on Telegram so I can test your changes before releasing it.

Hi ilyassesalama, I've been fix my library

TextView shows unstable max lines (Fix)
Action button don't have a space (Fix)
The animation is a bit unstable (Fix)
Option to use or not (...) (Fix)
item.isCollapsed() is variable to storing state (collapse or expand) for RecyclerView Item

Excellent, everything seems very well so far. One last thing, I noticed some instability in the RecylcerView, but I think it's related to item.isCollapsed(). Can you update your sample project as well with this method (Java if possible) so I can give it a test to know where the issue is coming from?

what instability do you mean?  can you give me a more detailed sample video or picture?

The first one I noticed is the chopped "collapse" text. I tested here using Arabic characters by typing "إخفاء". The result:

The second bug is that sometimes the TextView becomes like this:

Hi ilyassesalama, I've been updated my library, please check it and please give feedback again if you still have problems. Thank you

It's been more than a year, crazy. Just saw your release in my profile. Anyway, I gave the library a test again. But it seems like it's completely broken inside of RecyclerView.
https://github.com/eriffanani/TextViewReadMore/assets/46769766/47bdcc21-cc28-4cc6-a814-6a4feccd503a

Hi, Ilyas. Thanks for reaching out to me about this bug. I have resolved this bug. You can see the video I have attached. Please stay up to date, I will update the library version as soon as possible. Thank You.
https://github.com/eriffanani/TextViewReadMore/assets/26743731/3a78a85e-db09-4e9a-b914-bd474fe8b376


Composer Still Fails

The latest version still fails:
Fatal error: Cannot use 'true' as class name as it is reserved in luminova\bootstrap\functions.php on line 215

@teamayu This issue has been resolved by changing function locale(?string $locale = null): string|true to function locale(?string $locale = null): string|bool. You probably should add --no-cache while installing.