add dependency for keyvault certificates starter

add dependency for keyvault certificates starter

HI,@mnriem, I'm not sure why I can't reply to your content. I'll explain it here
The dependency used in starter is optional in azure-security-keyvault-jca, which will cause ClassNoDefException when azure-spring-boot-sample-keyvault-certificates is started.
https://github.com/Azure/azure-sdk-for-java/blob/5af23e5e66a2fb3312a248596771adf26ece1689/sdk/keyvault/azure-security-keyvault-jca/pom.xml#L129-L134

HI,@mnriem, I'm not sure why I can't reply to your content. I'll explain it here
The dependency used in starter is optional in azure-security-keyvault-jca, which will cause ClassNoDefException when azure-spring-boot-sample-keyvault-certificates is started.
https://github.com/Azure/azure-sdk-for-java/blob/5af23e5e66a2fb3312a248596771adf26ece1689/sdk/keyvault/azure-security-keyvault-jca/pom.xml#L129-L134

It is an optional dependency in azure-security-keyvault-jca, because it is relocated and shaded in. The dependency should not be added to the starter.

It is an optional dependency in azure-security-keyvault-jca, because it is relocated and shaded in. The dependency should not be added to the starter.

Hi, @lzc-1997-abel , I checked jar file. httpclient5 will be shaded in even though it is an optional dependency.
Refs:

cause ClassNoDefException when azure-spring-boot-sample-keyvault-certificates is started.

Could you please share the log of stack trace?

Hi, @lzc-1997-abel , I checked jar file. httpclient5 will be shaded in even though it is an optional dependency.
Refs:

cause ClassNoDefException when azure-spring-boot-sample-keyvault-certificates is started.

Could you please share the log of stack trace?

My fault, there is no problem starting the project through maven, it may be my idea configuration is wrong, I will modify the readme and fix this pr.

My fault, there is no problem starting the project through maven, it may be my idea configuration is wrong, I will modify the readme and fix this pr.


Drop furo-specific stylesheet

Furo is gonna add styles for supporting this extension directly. This can be merged once I make a Furo release with the relevant changes.

Codecov Report

Merging #22 (9cbd7ab) into main (6930a00) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #22   +/-   ##
=======================================
  Coverage   88.82%   88.82%
=======================================
  Files          10       10
  Lines         859      859
=======================================
  Hits          763      763
  Misses         96       96

Flag
Coverage Δ

pytests
88.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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

Cross post question: https://github.com/pradyunsg/furo/issues/111#issuecomment-899138969
I don’t see this css in furo yet?

@chrisjsewell I'm unlikely to make the change you've asked for in that comment.
As far as I am concerned, this stylesheet is completely wrong, since https://pradyunsg.me/furo/changelog/#beta39. I've overridden everything that this sets in Furo, and if you want sphinx-design to be usable in the current versions of Furo, it'd be best to just straight up drop this stylesheet IMO.
I'll defer to others on whether this should be merged or not. I'll note that if this PR gets rejected, I intend to remove the sphinx-design-specific stylesheets from Furo and also remove the relevant section from Furo's documentation.

if you want sphinx-design to be usable in the current versions of Furo, it'd be best to just straight up drop this stylesheet IMO.
if this PR gets rejected, I intend to remove the sphinx-design-specific stylesheets from Furo and also remove the relevant sections recommending/advertising support from Furo's documentation.

I'm a bit surprised by this comment, it feels a bit aggressive, no?
Just to clarify, this stylesheet is not part of the sphinx-design package, it is only used for the internal documentation, i.e. there is nothing for Furo to override unless users specifically choose to add this CSS to their package (outside of using the sphinx-design extension)
So I'm a little unclear why you feel this is such a critical issue?
This is not to say I'm against removing it.
As mentioned pradyunsg/furo#111, the only reason I added it was there were some issues with a few uses of elements in the documentation being visible in both light and dark mode; for example, if you create a black outline button then it is fine in light mode, but effectively invisible in dark mode.
It's a relatively niche case, but it brings in to question what it means to specify a dark/light color in such an adaptive theme
I would have imagined the more critical issue would be #21, which I was still hoping for a reply from you

I still do suggest dropping this stylesheet entirely -- having this means that the users don't get a representative view of how the extension will behave in their documentation, which... isn't ideal. :)

Ah yeh no worries, we've all been there lol. I'll try to get this sorted soon 👍

You're missing an important detail: there's a dark mode toggle in Furo. :)

What's the blockers to merging this again?

What's the blockers to merging this again?

will circle back around to this soon 😬

No worries, cheers! :)


NSMI Working Sessions - LSC Problem Codes Crosswalk

Need to do some NSMI working sessions for final suggestions / edits
(1) To suggest final inclusions for child level 1
(2) To ensure that LSC has done a crosswalk with their legal problem codes
Issue Submitted by Suzanne (SME)

Crosswalk between LSC Problem Codes and NSMI v1 completed.


CompactToken parsing failed with error code: 80049217

Hi guys
Currently, I try to use you graph API. I'm not using you ADD authentication library (I try to implement it by using oAuth 2). Here is my issue :

I request my authorization code and received it well
I request my token with a post on https://login.microsoftonline.com/common/oauth2/v2.0/token. Huuuum. Got an error:

Failed to load https://login.microsoftonline.com/common/oauth2/v2.0/token: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

Fun fact, the request trigger an error but I still received my token.
3. I send a request to https://graph.microsoft.com/v1.0/me/drive and adding my token to the headers :
headers: {
    'Authorization': 'Bearer <token>'
}

Weeeeeelll. The response sends me a 401 Unauthorized and a message :
{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "CompactToken parsing failed with error code: 80049217",
    "innerError": {
      "request-id": "5f98f27a-50ba-4ace-963b-60905bf4207c",
      "date": "2018-01-29T16:59:44"
    }
  }
}

Hum. I check the authorization in the header request :
Authorization:Bearer <token>

Weeeeeell. Actually. I'm lost. Can you help me?
Thanks,
SLedunois

Did you manage to solve this? I'm getting the same thing.

Hello @grebulon
No. I still got the issue

Can one of you provide an example token? To be safe, please wait an hour after generating it before providing it here.

I got this error code when sending the  part of the above as bytes rather than a utf-8 decoded string, so maybe check that?

I'm seeing the same error (albeit not in context of the OneDrive API, but rather the subscription API).  The token I'm getting is 1,282 bytes and appears to be constrained to the basic ASCII character set -- alphanumeric plus a couple dashes and underscores.  Does that sound like a proper / well-formed token?

(To clarify:  I'm using the /adminconsent endpoint to get the token, and am seeing the same error as the original poster, including the error code 80049217.)

Hi,
any update on this issue
Im getting "CompactToken parsing failed with error code: 80049217"

Any Update on this i am facing the same issue

Maybe it sounds stupid but double check:
When requesting the token you get an JSON object in response.
This object contains properties like expires_in, token_type and access_token.
When adding the Authorization: Bearer  to your request, you should replace  only with the access_token and not the entire object

How do we workaround this?

I experienced this error when keeping the token in a small variable. Make sure to use the complete token (mine finished with '...').

I'm getting the same error:
I'm using this url: https://login.microsoftonline.com/Tenant/oauth2/token?api-version=1.0

Same error ..

Try setting "resource" param when requesting the access token for the API.
You can find it "subtle" in the documentation (only within the example code):
https://developer.microsoft.com/en-us/graph/docs/concepts/rest
POST https://login.microsoftonline.com/common/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

{
  grant_type=authorization_code
  &code=AwABAAAA...cZZ6IgAA
  &redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
  &resource=https%3A%2F%2Fgraph.microsoft.com%2F
  &scope=mail.read
  &client\_id=<app ID>
  &client\_secret=<app SECRET>
}

-> &resource=https%3A%2F%2Fgraph.microsoft.com%2F

@phroggar even this is not working for me.. getting the error below:
error: 'invalid_request',
error_description: 'AADSTS90100: The \'resource\' request parameter is not supported.\r\n
error_codes: [ 90100 ],
timestamp: '2018-10-17 12:49:21Z',}

@SLedunois did you manage to figure this out?

@suparnavg Are you trying to connect with Office OneDrive business?

I'm facing the same issue, like this response:

{
    "error": {
        "code": "InvalidAuthenticationToken",
        "message": "CompactToken parsing failed with error code: 80049217",
        "innerError": {
            "request-id": "8d1bff80-e66a-4827-bf0b-40cf4dfbf8dc",
            "date": "2018-10-18T10:37:59"
        }
    }
}

Can this issue be reopened please? Otherwise I'll open another one (not the smartest choice, but...).

@jozeflambrecht it is a paid Office 365 account (I assume that is Onedrive business but can never be sure about the all the terminology!). This issue should be reopened..

@suparnavg I'm reopening the issue.

Thumbs up on this one. My issue might be related, but does not involve OneDrive specifically.
The past 24 hours I've been facing the same issue using the MS Graph API for a chatbot project (Bot Framework 4 Authentication Bot in NodeJS sample).
{"statusCode":401,"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","requestId":"e2628396-8c54-40bb-867c-d5a7640f296a","date":"2018-10-19T08:45:54.000Z","body":{"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","innerError":{"request-id":"e2628396-8c54-40bb-867c-d5a7640f296a","date":"2018-10-19T10:45:54"}}}

I'll be following along...

For the sake of clarity, I'm facing this issue

with an enterprise account
following the instructions of this page literally: https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user#1-register-your-app
after clearing cookies, nothing changes.

I solved my issue by:

following the instructions here: https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user#1-register-your-app - this included re-creating my app
adding the "resource" parameter to the token request as suggested by this comment: https://github.com/OneDrive/onedrive-api-docs/issues/785#issuecomment-420274451
clearing cookies

@suparnavg Can you please post the exact response? Below I'll clarify my scenario as much as I can, pardon me for the loooong answer.
My scenario is as follows: I want to authenticate users with Azure AD and read the profile of the authenticated user (only that user).
First of all, I authenticate users using the Azure AD oauth2 endpoint.
I'm using the openid strategy, and I'm asking for both the id_token and the authorization code at once, by visiting the following URL:
https://login.microsoftonline.com/MY_TENANT_ID/oauth2/authorize?scope=openid&response_type=code+id_token&client_id=MY_AZURE_APP_ID&nonce=A_RANDOM_HASH&state=ANOTHER_RANDOM_HASH&response_mode=form_post&redirect_uri=MY_APP_REDIRECT_URI
Note: all the UPPERCASE words must be replaced with actual values.
This URL pops up the Microsoft login prompt and, upon success, it redirects to the  <MY_APP_REDIRECT_URI> URL with the following parameters in POST:

code: authorization code, see below
id_token: identity token in JWT format
state: the same value I passed in the previous step, <ANOTHER_RANDOM_HASH>
session_state: a value of no particular interest

At this point, if the id_token passes JWT validation, the user is authenticated-so if all you need is the id_token, you're done.
But, I want to access the MS Graph API too, and to do so I need an access token which I can obtain by  POSTing the following parameters to the token URL ( https://login.microsoftonline.com/MY_TENANT_ID/oauth2/token )

client_id: the value used in MY_AZURE_APP_ID
scope: 'user.read mail.read', literally, or any other scope you need
code: the authorization code I received in the previous step
grant_type: 'authorization_code', literally
client_secret: an app secret created for MY_AZURE_APP_ID in the Azure portal;
redirect_uri: the value used above in MY_APP_REDIRECT_URI, or any other redirect URI I configured in the Azure portal;
resource: 'https://graph.microsoft.com/', literally (this is what I meant in my previous coment)

The reply should be a JSON object containing the keys:

"token_type": "Bearer"
"scope": "User.Read"
"expires_in": "3599"
"ext_expires_in": "0"
"expires_on": "..."
"not_before": "..."
"resource": "https://graph.microsoft.com/"
"access_token": "eyJ0..." this is what should be used in the next request.
"refresh_token": "AQABAAAAAA..."
"id_token": "eyJ0..."

Now I can access the Graph API, to get more information about the logged in user, by taking the returned access_token and making the following HTTP request:

URL: https://graph.microsoft.com/v1.0/me
Method: GET
Header: "Authorization: Bearer VALUE_OF_ACCESS_TOKEN"

@suparnavg can you post the entire error message? By the way, what is your scenario: mine is:

log users in using Azure AD.
read their user profile using the MS Graph API.

@paolostefan Are you building the app for users in your organization? If you use your own TENANT_ID the user has to already be in the Azure directory, correct?
Since I am building the app for users not in my organization I used common instead of a TENANT_ID. So the URL would look something like this,
https://login.microsoftonline.com/common/oauth2/authorize?scope=openid&response_type=code+id_token&client_id=MY_AZURE_APP_ID&nonce=A_RANDOM_HASH&state=ANOTHER_RANDOM_HASH&response_mode=form_post&redirect_uri=MY_APP_REDIRECT_URI
And when I do that it does not accept resource parameter.

 But my issue was the same as @Klervix . I had my token in database and it was getting truncated because JWT is a lot longer than your usual access token that you get from other services like Google or Facebook.
I kept on thinking why is everyone talking about JWT when I have a very short token in database.

@paolostefan thanks for the detailed answer
I am following the exact same steps as you, and my API calls are working fine (Calendar, Contacts, etc. all good) - except for OneDrive calls. I have included the Files.ReadWrite.All scope while registering the app, so invalid scopes should not be causing the problem.
While making the OneDrive API call, I use my existing refresh token to generate a new access token, then send a GET to this uri: "'https://graph.microsoft.com/v1.0/me/drive/root/children'" - which returns the error
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "CompactToken parsing failed with error code: 80049217",
    "innerError": {
      "request-id": "e4470a84-2674-4ee5-8ab4-d9b68786eb27",
      "date": "2018-10-25T04:10:11"
    }
  }

@ificator - there seem to be multiple issues here related to parsing the access token. Could you help resolve this? Is holding up deployment on a couple of features for me (and similar stories for others in this thread I imagine).

I just noticed that at least one of the drives that causes this issue just changed to Multi Factor Authentication. Can that be cause this error?

I am facing same issue
{
"error": {
"code": "InvalidAuthenticationToken",
"message": "CompactToken parsing failed with error code: 80049217",
"innerError": {
"request-id": "3786bbd7-5672-42b0-8257-e5e1e8b5fa8b",
"date": "2018-11-04T00:04:46"
}
}
}
Any solution, please ?

I have seen this error occur sporadically within the last few days without being able to consistently reproduce it.
I am using a personal OneDrive account for running tests, and when I repeat the same test with exactly the same stored refresh token and the exact same client id, the problem disappears again.

{
"error": {
"code": "InvalidAuthenticationToken",
"message": "CompactToken parsing failed with error code: 80049217",
"innerError": {
"request-id": "f42e2f5e-0fd4-4a58-8d9e-2852084b900e",
"date": "2018-11-16T23:33:18"
}
}
}

@miolfo already using Bearer {token} (without the :).. and this does work for other API calls (such as fetching events on a calendar)... would be fantastic if someone from the onedrive team could help resolve this once and for all..

Has anyone managed to solve the problem? I've been trying to figure this out for 2 days!

Double check the ID and secret you are using are correct as invalid ones will cause this error. You also need to make sure you are using the access_token and not the code query string in the auth header for graph calls e.g. Authorization: Bearer <access_token>.

Im getting this error when i tried to access using graph client
var rootItem = await graphServiceClient.Drive.Root.Request().GetAsync();
Server Error in '/' Application.
Code: InvalidAuthenticationToken
Message: CompactToken parsing failed with error code: 8004920A
Inner error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.Graph.ServiceException: Code: InvalidAuthenticationToken
Message: CompactToken parsing failed with error code: 8004920A

You cannot interchange tokens.
If you get a token using Azure 2.0, (your get token endpoint contains v2.0) then your get, post, patch, delete, etc methods have to be of the same type. You can't mix and match. I fixed my issue by changing my endpoint uri.  Please refer to this for more information on how to change your uri endpoint:
https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/calendar-rest-operations#create-events

I am facing this error while using Graph APIs. And the worse part is the APIs work just fine most of the times, but intermittently return this error.
Has anyone really found a solution for random/intermittent error returned by Graph APIs?

Hi, can you help me more or guide me so that i could do it because i didnt
know how to change my endpoint uri
On Mon, Mar 18, 2019 at 11:08 PM zkass<EMAIL_ADDRESS>wrote:

You cannot interchange tokens.
If you get a token using Azure 2.0, (your get token endpoint contains
v2.0) then your get, post, patch, delete, etc methods have to be of the
same type. You can't mix and match. I fixed my issue by changing my
endpoint uri. Please refer to this for more information on how to change
your uri endpoint:
https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/calendar-rest-operations#create-events
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/OneDrive/onedrive-api-docs/issues/785#issuecomment-474036930,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AqvJdWLx0bdy50u-DRQpBGNF9xNSCLcjks5vX9YrgaJpZM4RxCE0
.

Hi, Urjit i am also facing this error using Graph Api and i have not find a
solution yet ..
Please let me know or guide me if you have done it
On Thu, Mar 21, 2019 at 7:02 PM urjitgokhale<EMAIL_ADDRESS>wrote:

I am facing this error while using Graph APIs. And the worse part is the
APIs work just fine most of the times, but intermittently return this error.
Has anyone really found a solution for random/intermittent error returned
by Graph APIs?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/OneDrive/onedrive-api-docs/issues/785#issuecomment-475240413,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AqvJdd_OzE-Gl82tY5_J2a1Un2JFKeTDks5vY5DmgaJpZM4RxCE0
.

Unfortunately no. For now we retry the operation after some delay. But we really need a fix from MS, Or a formal documentation that tells how the application should react on receiving this error.

Hi there!
I've been working with access tokens for couple of weeks now. I'm kinda new to Java but I've found this link that helped me solve the issue with error "message": "CompactToken parsing failed with error code: 80049217"
https://contentanalytics.digital.accenture.com/pages/viewpage.action?pageId=685015085
The problem was in syntax when calling the service..it requires "space" between "Bearer" and the token you're using. You can do it like "Bearer " + token or as its shown on the link.
Might be late but I hope this helps!

Hi,
I also had the same problem, in my case I tried to authenticate against microsoft graph api from prowershell using oauth2 and in the headers it indicated this:
$response = Invoke-RestMethod -Method Post -Uri $tokenUrl -Headers @{"Content-Type" = "application/x-www-form-urlencoded"} -Body $body

So it indicated to the destination that the URL was encoded (it had to decode it to read it), but this was not true,
I was not coding anything and the client secret had special characters that disappeared when they were decoded. I tried to manually code the client secret through this page and it worked!

Another option is to generate secrets until it does not contain special characters

If anyone is still seeing this here was my issue.   In my Graph service I originally had this:
export default class GraphService {
  constructor() {
    this.graphUrl = 'https://graph.microsoft.com/v1.0'
  }

  getUserInfo(token) {
    const headers = new Headers({
      Authorization: `Bearer ${token}`
    })
    const options = {
      headers
    }
    return fetch(`${this.graphUrl}/me`, options)
      .then(response => response.json())
      .catch(response => {
        throw new Error(response.text())
      })
  }
}

I changed this line:
Authorization: Bearer ${token} to:  `Authorization: `Bearer ${token.accessToken}
Because the token object has other items in it besides the token itself.

@informatiq97 thanks sir, its work

Obviously this error is occurring when the token is malformed.
In my case it was malformed, because i was using postman. In the authentication tab just enter the token not the string "Bearer " in front of it.

I have received the same error.
I passed it by adding user.read to both requests get authorization code and get the token.
For example: scope = "user.read file.readwrite offline_access"

Like TruongDuyIT hinted, the request (acquireToken() / get https://graph.microsoft.com/v1.0/me/drive...) must include the scopes (permissions) for the token to be accepted.  For example, if I wanted the drive files (as in the request above), I must send the scope (https://graph.microsoft.com/)Files.Read (or related).  But if a request is made without the permission(s), that error will be returned.

Like TruongDuyIT hinted, the request (acquireToken() / get https://graph.microsoft.com/v1.0/me/drive...) must include the scopes (permissions) for the token to be accepted.  For example, if I wanted the drive files (as in the request above), I must send the scope (https://graph.microsoft.com/)Files.Read (or related).  But if a request is made without the appropriate permission(s), that error will be returned.

To add on to @matt-matt1 and @TruongDuyIT,
I was facing the same error but I've managed to fix it by requesting the correct scope permissions when getting the Authorization Code.
For my case, I was using (erroneously) onedrive.appfolder as written in section 2 of this documentation: Using an App Folder to store user content without access to all files. As a result, I got "CompactToken parsing failed with error code: 80049217".
However, I found out in this docs page: Permissions that the permissions I needed was: Files.ReadWrite.AppFolder.

Does anyone knows the difference between these 2 sets of authentication and authorization endpoints?

For OneDrive Personal: OneDrive authentication and sign-in
For Microsoft Graph: Authorization and sign-in for OneDrive in Microsoft Graph. This link is also missing Files.ReadWrite.AppFolder in the Authentication Scopes section too (which led me to use the other scope).

Although both links have the same "published dates", it seems that the 2nd link is the more updated way of requesting an access token. However, I was able to pass in onedrive.appfolder to the auth endpoints in the 2nd link (i.e. https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={client_id}&scope={scope}&response_type=token&redirect_uri={redirect_uri}) and retrieved an access token too but I would get the abovementioned error when I tried to access Graph API. Was this intended?

@1terahertz

Does anyone knows the difference between these 2 sets of authentication and authorization endpoints?

OneDrive authentication and sign-in: That's endpoint is authorizing an application to use a Microsoft account for personal OneDrive. I tried to use it with my Onedrive Business account, it didn't work.
You should follow the authorization process in Authorization and sign-in for OneDrive in Microsoft Graph, it's supports both personal and business accounts.

I was able to pass in onedrive.appfolder scope to the auth endpoints in the 2nd auth link, Microsoft Graph (i.e. https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={client_id}&scope={scope}&response_type=token&redirect_uri={redirect_uri}) and retrieved an access token too but I would get the abovementioned error when I tried to access Graph API. Was this intended?

The onedrive.appfolder or onedrive.readwrite permission scope when getting an access token is necessary.
You also need to activate the Files.ReadWrite.AppFolder permission on the menu API permissions (Delegated permissions) in your portal Azure app.
Note: If a request is made without the permission(s) (user.read or openid permission scope is important), that error will be returned.

@1terahertz

Does anyone knows the difference between these 2 sets of authentication and authorization endpoints?

OneDrive authentication and sign-in: That's endpoint is authorizing an application to use a Microsoft account for personal OneDrive. I tried to use it with my Onedrive Business account, it didn't work.
You should follow the authorization process in Authorization and sign-in for OneDrive in Microsoft Graph, it's supports both personal and business accounts.

I was able to pass in onedrive.appfolder scope to the auth endpoints in the 2nd auth link, Microsoft Graph (i.e. https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={client_id}&scope={scope}&response_type=token&redirect_uri={redirect_uri}) and retrieved an access token too but I would get the abovementioned error when I tried to access Graph API. Was this intended?

The onedrive.appfolder or onedrive.readwrite permission scope when getting an access token is necessary.
You also need to activate the Files.ReadWrite.AppFolder permission on the menu API permissions (Delegated permissions) in your portal Azure app.
Note: If a request is made without the permission(s) (user.read or openid permission scope is important), that error will be returned.

Is it still possible to add onedrive.appfolder permission? Is that added in portal.azure or is that just through the scope url?

Same issue here

My fix to the error 'CompactToken parsing failed with error code: 80049217' within Postman app: remove extra spave after 'Bearer' in Headrer Prefix :).

In my case it was the redirect URI of my app registration which was causing issues - in my scenario I'm using device code flow using microsoft graph.
I had set it up a web, however it should be "mobile & desktop application" as per screenshot below.
You can also inspect the access token by pasting it into https://jwt.io/, and you'll see the scopes, and other details to ensure your config is correct.

In my case it was the redirect URI of my app registration which was causing issues - in my scenario I'm using device code flow using microsoft graph.
I had set it up as web redirect, however it should be "mobile & desktop application" pointing to something like "http://localhost".
You can also inspect the access token by pasting it into https://jwt.io/, and you'll see the scopes, and other details to ensure your config is correct.

I fixed this issue by updating the settings file,
More details here https://razgaou.wordpress.com/2020/12/28/call-graph-api-with-the-cached-oauth-token-in-azure-function/

I fixed this issue by updating the settings file,
More details here https://razgaou.wordpress.com/2020/12/28/call-graph-api-with-the-cached-oauth-token-in-azure-function/

My issue was the resource key was with an upper character, just change it to lowercase "&resource=https://..."

https:///.auth/me
cookie in website: AppServiceAuthSession:
this solve this error
:)

Check if the correct token is being used. The correct token is the one you use to call the Endpoint (callEndPontWithToken)not the one you receive from getToken

I was passing in incorrect scope values, using the whole https://graph.microsoft.com/Calendars.Read instead of just Calendars.Read . Changing that fixed it for me.

When i had this issue it was because i was trying to use the OAuth Authentication method instead of Bearer which works in PowerShell 7 (in VSCode) but not PowerShell 5 (Azure Automation).
So once i changed to @{Authorization = "Bearer $AccessToken}            It Worked
Using this for API Calls.
Just if someone else has this silly issue.

I have also dealt with this.
My solution was that in addition to ['openid', 'profile', 'email'], the authorisation for 'User.read' was also missing.
scope: ['openid', 'profile', 'email', 'User.read']

Folks can use the MSAL family of libraries for token acquisition, to not have to learn the protocol etc. They also do a pretty good job with token caching, which is important when you scale out.

Just as an additional data point: I got this exact error once as intermittent error, that appeared and just disappeared again. So a solution that generally worked threw this once over a course of dozens of invocations. (I used Get-PnPGraphAccessToken to get the token.)

For what it's worth here: I found that different oauth scopes associated with your token can cause different token formats. My case it was an msads scope that caused a different format and caused the /me endpoint on the graph API to not work with this same errror: CompactToken parsing failed with error code: 80049217
Adding the open id/email/profile scopes were no help in fixing this.

Just had this error "CompactToken parsing failed with error code: 80049217" in my application as well after upgrading to the latest Graph API (5.30.0).
I found out that I was passing the wrong value to the IAuthenticationProvider.
Old:
		IAuthenticationProvider authProvider = new IAuthenticationProvider() {

			@Override
			public CompletableFuture<String> getAuthorizationTokenAsync(URL url) {
				String token = accessToken.toAuthorizationHeader();
				return CompletableFuture.completedFuture(token);
			}
		};

New:
		IAuthenticationProvider authProvider = new IAuthenticationProvider() {

			@Override
			public CompletableFuture<String> getAuthorizationTokenAsync(URL url) {
				String token = accessToken.getValue();
				return CompletableFuture.completedFuture(token);
			}
		};

The return value of accessToken.toAuthorizationHeader() prepends "Bearer " to the access token, but that way you end up with "Bearer Bearer" getting sent to the server, because the Graph API already adds that keyword.

Obviously this error is occurring when the token is malformed. In my case it was malformed, because i was using postman. In the authentication tab just enter the token not the string "Bearer " in front of it.

Oi, that's nuts! That worked for me. I hate it when API's behave so differently from even the same organisation. Blèh, another afternoon wasted.
Thank you, so much for this answer, ofc!

As part of a repository clean up effort we are closing older issues. If this issue remains, please: open a new issue, reference this issue, and provide any additional details that may help in resolution. Thank you for your understanding as we work to improve our responsiveness.


Why react and react-dom are not in peerDependency?

I refer to these lines in package.json
https://github.com/kako0507/react-onclickoutside-decorator/blob/2271f5dbfc81ad28708f335fc3ea877969fab78b/package.json#L30-L31
I'm not an expert but as far as I know they both should be in "peerDependencies" and "devDependencies".
Can you please consider changing that behaviour? @kako0507

@GianDigia  Thanks for your helping :)


do not trigger events when updating tinymce

...which prevents bold/itlic button to not gain focus on empty lines due to markCaretContainersBogus() function in tinymce being called. The is to fix issue #229.

I still have not been able to reproduce the problem. Mind posting plunkers with and without the problem so I can see it broken and fixed?
No problem getting this in, just want to confirm this is fixing an issue.

I'm sorry, I was using an old version of TinyMCE on one of my plunkers. I do see the issue, thanks for reporting.

I do see the issue now, sorry about that.
Unfortunately, while this does seem to fix the issue you describe, it breaks other things.
Take a look at this plunker with your fix.
Some issues I see:

Model is not always updated when it should be.
An extra  tag can be left with no content inside.

With no content in the editor, hit bold, and then hit bold again, and then begin typing.

I am happy to merge this in if we can come up with a solution which does not break other stuff. I will continue to think about this.

I took a deeper look into tinymce, the first problem seems to be that 'change' event is only fired on the first character typed of an Undo stack, and not fired in subsequent character changes.
This was previously avoided by calling editor.save which triggers an event that creates a new stack every time, this has a side effect of making undo to behave differently than vanilla tinymce.
The second problem seems to be a tinymce 'bug', you can see the same behaviour on their homepage demo by clicking on bold button a few times on an empty line, then look at the source -- a few empty  tags will be created there. I'll have to think about how to properly fix this behaviour.

The second problem seems to be a tinymce 'bug', you can see the same behaviour on their homepage demo by clicking on bold button a few times on an empty line, then look at the source, a few empty tags will be created there. I'll have to think about how to properly fix this behaviour.

I'm happy to not worry about that then, and file a bug with TinyMCE instead.
The model still needs to update correctly in normal use though.

cool, I added more changes and merged with latest. Main change is listening to KeyUp event instead of change event, which will be fire on all keystrokes instead of the first sequence of keystrokes of an Undo level.

It looks like you update the pull request incorrectly.
I am seeing changes which should already be in master showing up.
Can you squash this down to one commit and make sure only your changes show up in changes tab?

Oops, never done that before, but here you go!

Interesting, the timeout was previously needed, but does not seem necessary anymore after merging with some recent changes. They are removed now.


frontend: delete goal button API request

javascript for once the button clicked on user single goal view as per the wireframe


Group Capstone JavaScript

https://github.com/Javed-Shahbaz/JavaScript-Capstone/projects/1
we are two teammates
@Javed-Shahbaz
@LarryIVC
contributing in this project.

STATUS: APPROVE :heavy_check_mark: :heavy_check_mark:  :champagne:
Hi @Javed-Shahbaz and @LarryIVC
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉 :clap: :clap: :100:

To highlight :champagne:

All linters are passing :heavy_check_mark:
Good commit history :heavy_check_mark:
Good PR description :heavy_check_mark:
Your README file is professional :heavy_check_mark:

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please ping me @tresorsawasawa when you comment so I can receive the notification or use slack with the same name.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Compiling develop-themes fails on debian stretch (scrypt-sse2 error)

I tried to build the develop-themes code on Debian (9) stretch x86 (and I'm not in a VM).
I did follow the instructions and did exactly what is told here: https://wiki.anoncoin.net/How_to_build_Anoncoin_develop  except that I did 'git checkout develop-themes' in that case.
Unfortunately the last make command still ends with scrypt-sse2 error, and no anoncoin programs are build.
The fist make command was succesful though (in depends directory).
(And just to let you know, I install debian 8 jessie x86 in a VM and did the same thing, I had almost exactly the same errors. The Debian stretch host system is on an external USB drive, so I also tried to compile on another computer, but it gives the same errors)

edit: tried to compile develop also as lunokhod told me. No more luck, same errors.
In anoncoin directory I ran:
make clean
git checkout develop
./configure --prefix=`pwd`/depends/i686-pc-linux-gnu
make

Here are the logs (don't know if I should use an external pastebin for them):
$ make

Making all in src
make[1]: Entering directory '/home/user/Code/anoncoin/src'
make[2]: Entering directory '/home/user/Code/anoncoin/src'
  CXX      libanoncoin_common_a-scrypt-sse2.o
scrypt-sse2.cpp: In function ‘void scrypt_1024_1_1_256_sp_sse2(const char*, char*, char*)’:
scrypt-sse2.cpp:124:50: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
    X.i128[k] = _mm_xor_si128(X.i128[k], V[j + k]);
                                                  ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h: In function ‘void xor_salsa8_sse2(__m128i*, const __m128i*)’:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:44:39: error: called from here
  X0 = B[0] = _mm_xor_si128(B[0], Bx[0]);
                                       ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:45:39: error: called from here
  X1 = B[1] = _mm_xor_si128(B[1], Bx[1]);
                                       ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:46:39: error: called from here
  X2 = B[2] = _mm_xor_si128(B[2], Bx[2]);
                                       ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:47:39: error: called from here
  X3 = B[3] = _mm_xor_si128(B[3], Bx[3]);
                                       ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:51:28: error: called from here
   T = _mm_add_epi32(X0, X3);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:52:46: error: called from here
   X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 7));
                                              ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:52:47: error: called from here
   X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 7));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:53:47: error: called from here
   X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 25));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:53:48: error: called from here
   X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 25));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:54:28: error: called from here
   T = _mm_add_epi32(X1, X0);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:55:46: error: called from here
   X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9));
                                              ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:55:47: error: called from here
   X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:56:47: error: called from here
   X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:56:48: error: called from here
   X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:57:28: error: called from here
   T = _mm_add_epi32(X2, X1);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:58:47: error: called from here
   X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 13));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:58:48: error: called from here
   X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 13));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:59:47: error: called from here
   X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 19));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:59:48: error: called from here
   X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 19));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:60:28: error: called from here
   T = _mm_add_epi32(X3, X2);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:61:47: error: called from here
   X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:61:48: error: called from here
   X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:62:47: error: called from here
   X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:62:48: error: called from here
   X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:65:35: error: called from here
   X1 = _mm_shuffle_epi32(X1, 0x93);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:66:35: error: called from here
   X2 = _mm_shuffle_epi32(X2, 0x4E);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:67:35: error: called from here
   X3 = _mm_shuffle_epi32(X3, 0x39);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:70:28: error: called from here
   T = _mm_add_epi32(X0, X1);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:71:46: error: called from here
   X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 7));
                                              ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:71:47: error: called from here
   X3 = _mm_xor_si128(X3, _mm_slli_epi32(T, 7));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:72:47: error: called from here
   X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 25));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:72:48: error: called from here
   X3 = _mm_xor_si128(X3, _mm_srli_epi32(T, 25));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:73:28: error: called from here
   T = _mm_add_epi32(X3, X0);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:74:46: error: called from here
   X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9));
                                              ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:74:47: error: called from here
   X2 = _mm_xor_si128(X2, _mm_slli_epi32(T, 9));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:75:47: error: called from here
   X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:75:48: error: called from here
   X2 = _mm_xor_si128(X2, _mm_srli_epi32(T, 23));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:76:28: error: called from here
   T = _mm_add_epi32(X2, X3);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:77:47: error: called from here
   X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 13));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:77:48: error: called from here
   X1 = _mm_xor_si128(X1, _mm_slli_epi32(T, 13));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:78:47: error: called from here
   X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 19));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:78:48: error: called from here
   X1 = _mm_xor_si128(X1, _mm_srli_epi32(T, 19));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:79:28: error: called from here
   T = _mm_add_epi32(X1, X2);
                            ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1139:1: error: inlining failed in call to always_inline ‘__m128i _mm_slli_epi32(__m128i, int)’: target specific option mismatch
 _mm_slli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:80:47: error: called from here
   X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:80:48: error: called from here
   X0 = _mm_xor_si128(X0, _mm_slli_epi32(T, 18));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1204:1: error: inlining failed in call to always_inline ‘__m128i _mm_srli_epi32(__m128i, int)’: target specific option mismatch
 _mm_srli_epi32 (__m128i __A, int __B)
 ^
scrypt-sse2.cpp:81:47: error: called from here
   X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14));
                                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1282:1: error: inlining failed in call to always_inline ‘__m128i _mm_xor_si128(__m128i, __m128i)’: target specific option mismatch
 _mm_xor_si128 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:81:48: error: called from here
   X0 = _mm_xor_si128(X0, _mm_srli_epi32(T, 14));
                                                ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:84:35: error: called from here
   X1 = _mm_shuffle_epi32(X1, 0x39);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:85:35: error: called from here
   X2 = _mm_shuffle_epi32(X2, 0x4E);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1411:1: error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi32(__m128i, int)’: target specific option mismatch
 _mm_shuffle_epi32 (__m128i __A, const int __mask)
 ^
scrypt-sse2.cpp:86:35: error: called from here
   X3 = _mm_shuffle_epi32(X3, 0x93);
                                   ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:89:31: error: called from here
  B[0] = _mm_add_epi32(B[0], X0);
                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:90:31: error: called from here
  B[1] = _mm_add_epi32(B[1], X1);
                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:91:31: error: called from here
  B[2] = _mm_add_epi32(B[2], X2);
                               ^
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i586-linux-gnu/4.9/include/emmintrin.h:1019:1: error: inlining failed in call to always_inline ‘__m128i _mm_add_epi32(__m128i, __m128i)’: target specific option mismatch
 _mm_add_epi32 (__m128i __A, __m128i __B)
 ^
scrypt-sse2.cpp:92:31: error: called from here
  B[3] = _mm_add_epi32(B[3], X3);
                               ^
Makefile:2674: recipe for target 'libanoncoin_common_a-scrypt-sse2.o' failed
make[2]: *** [libanoncoin_common_a-scrypt-sse2.o] Error 1
make[2]: Leaving directory '/home/user/Code/anoncoin/src'
Makefile:5136: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/Code/anoncoin/src'
Makefile:574: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

and building develop on Linux mint 17 32bits VM also failed. (Host system is debian 9 32 bits)
Slightly different messages but still related to sse2:
$ make
Making all in src
make[1]: entrant dans le répertoire « /home/user/Code/anoncoin/src »
make[2]: entrant dans le répertoire « /home/user/Code/anoncoin/src »
  CXX      compat/libanoncoin_util_a-glibc_sanity.o
  CXX      compat/libanoncoin_util_a-glibcxx_sanity.o
  CXX      libanoncoin_util_a-clientversion.o
  CXX      libanoncoin_util_a-rpcprotocol.o
  CXX      libanoncoin_util_a-sync.o
  CXX      libanoncoin_util_a-util.o
  AR       libanoncoin_util.a
  CXX      libanoncoin_common_a-allocators.o
  CXX      libanoncoin_common_a-base58.o
  CXX      libanoncoin_common_a-chainparams.o
  CXX      libanoncoin_common_a-coins.o
  CXX      libanoncoin_common_a-core.o
  CXX      libanoncoin_common_a-hash.o
  CXX      libanoncoin_common_a-key.o
  CXX      libanoncoin_common_a-keystore.o
  CXX      libanoncoin_common_a-netbase.o
  CXX      libanoncoin_common_a-protocol.o
  CXX      libanoncoin_common_a-script.o
  CXX      libanoncoin_common_a-scrypt.o
  CXX      libanoncoin_common_a-scrypt-sse2.o
In file included from scrypt-sse2.cpp:36:0:
/usr/lib/gcc/i686-linux-gnu/4.8/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"
 # error "SSE2 instruction set not enabled"
   ^
scrypt-sse2.cpp:38:36: error: variable or field ‘xor_salsa8_sse2’ declared void
 static inline void xor_salsa8_sse2(__m128i B[4], const __m128i Bx[4])
                                    ^
scrypt-sse2.cpp:38:36: error: ‘__m128i’ was not declared in this scope
scrypt-sse2.cpp:38:50: error: expected primary-expression before ‘const’
 static inline void xor_salsa8_sse2(__m128i B[4], const __m128i Bx[4])
                                                  ^
make[2]: *** [libanoncoin_common_a-scrypt-sse2.o] Erreur 1
make[2]: quittant le répertoire « /home/user/Code/anoncoin/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/user/Code/anoncoin/src »
make: *** [all-recursive] Erreur 1

Cpuinfo:
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 nx rdtscp constant_tsc pni monitor ssse3

OK, thanks to mrebum, the workaround for now is to type this before the final configure and make commands:
export CFLAGS="-msse2" ; export CPPFLAGS="-msse2" ; export CXXFLAGS="-msse2"

It worked for Linux Mint 17 32 bit in VM. I'll confirm for debian stretch when I have time to test.

Tested on (stable) Debian Stretch 8.3 32-bit and 64-bit.
64-bit compiled and installed with no issues, 32-bit required exporting the sse2 flags.
Please close this issue.

Thank you!


R&D CLIP model training and adding to the library

This issue specifies the roadmap for adding CLIP to Hezar (model architecture, task, datasets, pretrained weights, etc)

The general steps to take:

R&D model architecture, code and possibility of training the model
R&D the preferred dataset
R&D the required preprocessors and check if we already have them in Hezar
R&D the implemented and trained models on Persian

Then, for each of these steps, open an issue.

@arxyzan jan, I'm on it

Useful links: https://github.com/sajjjadayobi/CLIPfa
https://huggingface.co/datasets/amir7d0/laion20M-fa

This task has been postponed for later.


Sqequence Crafting dont load Crafttweaker any more

After the Update of Create to 0.5.0 Crafttweaker dontload any more with the same recipes for the sequence assemply any more.
https://pastebin.com/98vnF3yT
https://imgur.com/a/hPQu3Ft

Fixed by https://github.com/jaredlll08/CreateTweaker/commit/6e4aed04b7e108602136e2f5b12b956eaf942f24


Null ref on binding to static property

Environment

Visual Studio 16.5
Windows 10
Avalonia latest master (0.9.999-cibuild0006779-beta)

Bug
Trying to bind to a static property fails outright with a null ref:
class AnObject
{
    public static event PropertyChangedEventHandler StaticPropertyChanged;

    private static void OnStaticPropertyChanged(string propertyName)
    {
        StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(propertyName));
    }

    private static bool _myProperty = true;

    public static bool MyProperty
    {
        get => _myProperty;
        set
        {
            _myProperty = value;
            OnStaticPropertyChanged(nameof(MyProperty));
        }
    }
}

<CheckBox
      IsChecked="{Binding Path=(local:AnObject.MyProperty)}"
      Content="I should be checked on startup"/>

The info on binding to a static property came from this SO post.
Stack Trace
   at Avalonia.Data.Core.AvaloniaPropertyAccessorNode.get_PropertyType()
   at Avalonia.Data.Core.ExpressionObserver.get_ResultType()
   at Avalonia.Data.Core.BindingExpression.OnNext(Object value)
   at Avalonia.Reactive.AvaloniaPropertyObservable`1.Subscribed(IObserver`1 observer, Boolean first)
   at Avalonia.Reactive.LightweightObservableBase`1.Subscribe(IObserver`1 observer)
   at Avalonia.Data.BindingOperations.Apply(IAvaloniaObject target, AvaloniaProperty property, InstancedBinding binding, Object anchor)
   at Avalonia.AvaloniaObjectExtensions.Bind(IAvaloniaObject target, AvaloniaProperty property, IBinding binding, Object anchor)
   at StaticObjectBinding.MainWindow.!XamlIlPopulate(IServiceProvider , MainWindow ) in C:\Users\myname\source\repos\AvaloniaBugs\StaticObjectBinding\MainWindow.xaml:line 10

On an earlier CI build (0.9.999-cibuild0006647-beta), the binding fails silently (although I'm using it for a MenuItem's IsVisible property).
Reproducible Sample
https://github.com/Deadpikle/AvaloniaBugs/tree/master/StaticObjectBinding

I don't think we support binding to static properties. You should be able to use x:Static instead.

OK, sounds fine. Thank you. I was able to come up with a solution for my application.
Should this issue be closed (read: "we won't support this") or left open (read: "we'll support this eventually maybe")?

+1 to this feature request.

Tested and seems it is fixed already


homepage does not show any albums

After the recent update, I noticed that the homepage does not show any albums anymore:
https://leonieke.eu/photos/piwigo/
Should I change any settings to get albums back again?
Thanks!

It seems the gdThumb plugin throws errors. There are other javascript errors, too, which indicates something went wrong.
First, try to delete compiled templates in Admin -> Tools -> Maintenance
If that doesn't help, try to uninstall the theme, make sure the themes/bootstrap_darkroom folder is gone afterwards, and install the theme again. The configuration will not be lost when uninstalling (could be called a bug, or a feature..)

Thanks! Purging the compiled template did the trick!


Confine GRUB providers to presence of menus, prefer GRUB 2

On a GRUB 2 system, the GRUB 1 provider will always match as it's only confined
on the presence of Augeas and so the behaviour is often random, it might choose
the older provider:
Warning: Found multiple default providers for kernel_parameter: grub,
grub2; using grub

Since we'll never create GRUB configurations from scratch, it makes sense to
confine these providers to their files, and prefer GRUB 2 over GRUB 1.

I am working on some CentOS 7.0 and RHEL 7.0 systems and am getting the Found multiple default providers for kernel_parameter warning. Is there a fix for this in the works or should I start hunting around in the code to try and fix it?

I'm pretty sure this fixes it, but I haven't got the tests fixed to merge it - sorry.

Hi,
I actually created a custom fact called 'grubversion' and then I just use that in the grub/grub2 provider to confine:
Facter.add(:grubversion) do
  if File.exists?("/boot/grub")
    version = 1
  elsif File.exists?("/boot/grub2")
    version = 2
  else
    fail("Failed to evaluate grub version")
  end

  setcode { version }
end

grub legacy provider:
confine :grubversion => 1

grub2 provider:
confine :grubversion => 2

I quite like this as I can also re-use the grubversion fact in my manifests etc.
Cheers,
Matteo


How do I load the tensors in Rust?

Hi,
I am unable to find good documentation to read the weights in rust. I want to write gpt2 from scratch, and want to be able to load the HF weights. Since, I only plan to use the ndarray library, I want to be able to load the FP32 tensors somehow. Please help.
In python I do:
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
import safetensors

tokenizer = AutoTokenizer.from_pretrained("gpt2")
model = AutoModelForCausalLM.from_pretrained("gpt2")
safetensors.torch.save_model(model, 'gpt2_weights.st')

I want to use some code like this in rust (which is currently incorrect because safetensors doesn't have a Reader) and I am unable to figure out the API.
use safetensors::Reader;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    let reader = Reader::from_file("gpt2_weights.st")?;

    for (name, tensor) in reader.tensors() {
        println!("Tensor name: {}", name);
        let tensor = tensor?;
        println!("Shape: {:?}", tensor.shape());
    }

    Ok(())
}

I'd also like some more info about this as well. I have been trying to deconstruct the tests to get an idea how to get the dtype'd tensor in the rust side.
https://github.com/huggingface/safetensors/blob/86e356fed6b75d4b0a06ee446ab94f1317eafc2e/safetensors/src/tensor.rs#L390-L428 This may have some hints about it. The data comes as u8 which then needs to be converted to the dtype (which is in the tensor metadata). That should get the resulting tensor in proper data type. But i couldn't wrap together enough code to get it working.

Please share if you get this working! I tried to look at the candle codebase, maybe we can look at these tests -> https://github.com/huggingface/candle/blob/main/candle-core/src/safetensors.rs

For my use cases I have the following loading from a buffer (for use in WASM specifically).
use candle_core::{DType, Device, Tensor};
use safetensors::tensor::TensorView;
use safetensors::{tensor::TensorInfo, Dtype, SafeTensorError, SafeTensors};

// Some are not supported in candle_core
pub fn into_dtype(dtype: Dtype) -> DType {
    match dtype {
        Dtype::F32 => DType::F32,
        // Dtype::F16 => DType::F16,
        // Dtype::BOOL => DType::BOOL,
        Dtype::U8 => DType::U8,
        // Dtype::I8 => DType::I8,
        // Dtype::I16 => DType::I16,
        // Dtype::U16 => DType::U16,
        // Dtype::BF16 => DType::,
        Dtype::I32 => DType::I64,
        Dtype::U32 => DType::U32,
        Dtype::F64 => DType::F64,
        Dtype::I64 => DType::I64,
        // Dtype::U64 => DType::U64,
        _ => todo!(),
    }
}

// Probably not efficient to move from the tensor view into the raw buffer here
pub fn from_tensor_view(t: &TensorView) -> Result<Tensor, candle_core::Error> {
    Tensor::from_raw_buffer(t.data(), into_dtype(t.dtype()), t.shape(), &Device::Cpu)
}

fn from_tensor_views(tensors: Vec<TensorView>) -> Vec<Tensor> {
    tensors
        .iter()
        .filter_map(|t| from_tensor_view(t).ok()) // Drops invalid here, be aware
        .collect()
}

// SafeTensors crate has a read metadata from buffer but not in candle_core that I could find
fn get_metadata() -> Result<HashMap<String, String>, SafeTensorError>{
     let (_size, metadata) = SafeTensors::read_metadata(buffer)?;

    metadata.metadata().to_owned().ok_or_else(|| {
        SafeTensorError::IoError(io::Error::new(
            io::ErrorKind::InvalidData,
            "invalid metadata",
        ))
    })
}

Candle core also has a safetensors entry.
I tried to use just the safetensors crate but the amount of code in candle core to convert over the different types was a little beyond the amount of time I could look into it. I think the tradeoff was OK, added about 130KB to my WASM file but I didn't have to write out all conversions and I get tensor calculation support. No WebGPU support yet it seems so just CPU (as to why the device is just CPU there).
Maybe some simple conversion could be possible without requiring a crate here or maybe a better way of converting it over would be adequate. Works OK for my use case. Thanks for pointing out this option.

Solutions seems fine, not the most efficient but that's ok given the issue is in candle requiring a copy (because it requires ownership).
As a backnote, safetensors only exposes [u8] because dtypes require alignement, which byte buffer don't therefore it's easier to work with any alignment exposing pure bytes, and only make alignement as an optimization trick to do actual zero-copy (which is what is done for PyTorch for instance).


show more than 1 in same time

hi, I'm not able to show more than one item at the same time, how could I do that?

Hi, please check Docs for a list of the available props.
And here some examples on how to use them

thank you


Fixes broken tests for suse and adds in license accept (travis)

This commit removes opensuse leap 42 as it is no longer supported and
replaces it with opensuse leap 15.
It also adds in opensuseleap to the platform family specific
attributes alongside suse so that the correct attributes are used in the
recipe when the platform_family is opensuseleap.
It also adds in CHEF_LICENSE=accept for the last travis tests.
Signed-off-by: Rudi Kramer<EMAIL_ADDRESS>Description
This fixes the remaining broken tests on travis ci.
Issues Resolved
https://github.com/chef-cookbooks/rsyslog/issues/156
Check List

[x] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[x] New functionality includes testing.
[x] New functionality has been documented in the README if applicable
[x] All commits have been signed for the Developer Certificate of Origin. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

Hey, I'm closing this as it relates to Travis, if you think the open-suse work is still required please open a new PR with it in :)


A way to specify return value if permission fails.

Would be quite useful, IMO.
I would prefer to have an option to return some value in a restricted fields in case of a permission fail.
Possible solution:
A new permission base class
class QuietBasePermission(BasePermission):
    default_value: Any = None

And some changes in GraphQLCoreConverter to handle it:
        async def _check_permissions_async(
            source: Any, info: Info, kwargs: Dict[str, Any]
        ) -> Optional[QuietBasePermission]:
            failed_perm = None
            for permission_class in field.permission_classes:
                permission = permission_class()
                has_permission: bool

                has_permission = await await_maybe(
                    permission.has_permission(source, info, **kwargs)
                )

                if not has_permission and not isinstance(permission, QuietBasePermission):
                    message = getattr(permission, "message", None)
                    raise PermissionError(message)
                elif not has_permission:
                    failed_perm = permission
            return failed_perm
....
        async def _async_resolver(_source: Any, info: GraphQLResolveInfo, **kwargs):
            strawberry_info = _strawberry_info_from_graphql(info)
            perm_failed = await _check_permissions_async(_source, strawberry_info, kwargs)
            if perm_failed:
                return perm_failed.default_value

            return await await_maybe(_get_result(_source, strawberry_info, **kwargs))

It returns the last default value for a permission check fail if there are multiple, and raises a PermissionError if required by some other permission.

At the first glimpse I thought permission fail on a field ruined the whole query, which is not the case, nonetheless, a default value for permission fail seems useful to me.


Adding commit's github link to each build

This adds a direct link to github pointing to the commit that triggered the build.
It doesn't go directly to the PR (given that codeship doesn't know about PRs) but it's one click closer to it.

Thanks for this, Gui. Looks good, but if we're going to go to the trouble of linking to a github commit, I think the visible link text should indicate what commit it's pointing to. LMK what you think.

I think the commit ID is not the short version... so this might become too
big.
Also, when the branch name is too big, this ends up hidden (overflow
hidden).
I thought about putting a second line but this would eat vertical space, so
I couldn't find a great solution.
On Mon, Mar 21, 2016 at 5:09 PM, Dan Apczynski<EMAIL_ADDRESS>wrote:

Thanks for this, Gui. Looks good, but if we're going to go to the trouble
of linking to a github commit, I think the visible link text should
indicate what commit it's pointing to. LMK what you think.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/danapczynski/shipscope/pull/3#issuecomment-199550401

Also, can you see what happens when the commit subject is too long? I suspect it's going to get truncated away:

Yeah... the overflow problem.
Maybe putting it before it in the left side?
or a GH icon floating to the right if the green button?
 I
suspect it's going to get truncated away:
[image: image]
https://cloud.githubusercontent.com/assets/4496588/13938140/1e6f6a62-ef88-11e5-90eb-8650cbbe250f.png
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/danapczynski/shipscope/pull/3#issuecomment-199551935

@danapczynski another look?


Isolated post-mortem

Byebug post-mortem debugging is very useful for identifying and fixing problems, however in some of my more complex scripts, I have a lot of error recovery going on and it doesn't work.

If I use catchpoints, all exceptions are broken, even ones that are raised and handled in ordinary flow.

I want a middle group: something that allows me to automatically break on an uncaught exception, without running all of my cleanup code. I was able to implement this with a monkey patch, but it would be great to have something like this built into byebug in the future.
Byebug.byebug_on_error do
  foo = 1
  raise "automatically break on this line"
  foo += 1
end

This would be pretty nice, I want to do this all the time!
I think there may be a problem with test framework compatibility though -- many test frameworks will catch exceptions inside for display/output later, which means the exception will never bubble up to your begin/rescue block.
To get around that, when I have control of the exception classes, I've done:
class MyError < StandardError
  def initialize(*args)
    byebug
  end
end

It's also nice that this doesn't modify the code being tested -- only the potential exceptions that may be thrown.
Of course, if Byebug were to do something like this, it'd mean a highly-invasively reopening external error classes.


Kafka plugin doesn't show data correctly in panel

Describe the bug
We configured comma separated Kafka servers in data source. While exploring data we added topic name, but in panel it doesn't show proper data. Also timestamp value is different. It shows "1754-08-31 04:37:09.129" value in timestamp.

Please find Json data below receiving from Kafka server.
{
   "beginTime": "1667562006",
   "counters": {
      "155": {
         "": {
            "VALUE_1": "0",
            "VALUE_2": "0"
            "VALUE_3": "0.000000",
            "VALUE_4": "0",
            "VALUE_5": "0.000000",
            "VALUE_6": "0.000000",
            "VALUE_7": "0.000000",
            "VALUE_8": "0.000000"
         }
      }
   },
   "endTime": "1667562306",
   "granPeriod": "300",
   "timezone": "IST+05:30",
   "R_MAC": "***************",
   "RU_ID": "**",
   "G_NAME": "***************",
   "VNF_ID": "***************-*****",
   "DU__ID": "0",
   "C_ID": "***",
   "G_ID": "****",
   "senderType": "***************",
   "swVersion": "***********",
   "clu_id": "***************",
   "GSwVersion": "***************"
}

To Reproduce
Steps to reproduce the behavior:

Go to 'Add data source and configure topic name in server'
Once added, click on 'explore'
Add topic name
As mentioned above, we see the data. Auto offset reset = Latest, partition = 0, timestamp mode =  message timestamp

Expected behavior
As we receive data at each 5 min of interval, it should show data in panel.
Screenshots

After changing timestamp mode to now.

Desktop Information:

OS: ubuntu 18.04 LTS
Browser: firefox
Plugin Version = 0.2.0
Grafana Version: Tried on both 8.2.1 and 9.0.9

Additional context
Add any other context about the problem here.

@hoptical Can you check once and give inputs ?

@Dhyanesh97 Hi. Sorry for the late answer. I will check this out and get back to you soon.

The readme makes it clear that the plugin does not work with nested JSON records, only flat key-value pairs

@OneCricketeer @hoptical Would it possible to add this as feature request ?
Would nice to have monitoring/alerting for kafka with Grafana instead of using any alternate way.

In my opinion, I'd rather use Kafka Connect to write to a JDBC database, Elasticsearch, or Influx, then use those as data sources.

Thank you for putting this together. I do encounter a similiar problem. My JSON only consists of float values
 {'motor_casing_vibration': 2.3857060000000003, 'motor_frequency_a': 49.43576, 'motor_frequency_b': 50.434024810790994, 'motor_frequency_c': 44.53125, 'motor_speed': 616.7824, 'motor_current': 81.80225, 'motor_active_power': 14.098670000000002, 'motor_apparent_power': 15.70457, 'motor_reactive_power': 15.147570000000002, 'motor_shaft_power': 14.539929999999998, 'motor_phase_current_a': 42.885, 'motor_phase_current_b': 48.74005, 'motor_phase_current_c': 34.39921, 'motor_coupling_vibration': 14.46289, 'motor_phase_voltage_ab': 420.4596, 'motor_phase_voltage_bc': 465.5061, 'motor_phase_voltage_ca': 459.461, 'pump_casing_vibration': 2.3857060000000003, 'pump_stage_1_impeller_speed_1': 667.2126, 'pump_stage_1_impeller_speed_2': 399.822, 'pump_stage_1_impeller_speed_3': 886.5435, 'pump_stage_1_impeller_speed_4': 536.0215, 'pump_stage_1_impeller_speed_5': 1092.674, 'pump_stage_1_impeller_speed_6': 672.2041, 'pump_stage_2_impeller_speed_1': 697.3726, 'pump_stage_2_impeller_speed_2': 801.7662, 'pump_stage_2_impeller_speed_3': 843.7883, 'pump_stage_2_impeller_speed_4': 797.8337, 'pump_stage_2_impeller_speed_5': 499.1729, 'pump_stage_2_impeller_speed_6': 662.5, 'pump_stage_2_impeller_speed_7': 794.7916, 'pump_stage_2_impeller_speed_8':<PHONE_NUMBER>000001, 'pump_stage_2_impeller_speed_9': 511.3185, 'pump_inlet_flow': 266.2474, 'pump_discharge_flow': 591.006, 'pump_unknown': 689.3682, 'pump_lube_oil_overhead_reservoir_level': 0.0, 'pump_lube_oil_return_temp': 41.40625, 'pump_lube_oil_supply_temp': 29.16667, 'pump_thrust_bearing_active_temp': 114.5833, 'motor_non_drive_end_radial_bearing_temp_1': 29.94792, 'motor_non_drive_end_radial_bearing_temp_2': 30.989582061767603, 'pump_thrust_bearing_inactive_temp': 53.38541, 'pump_drive_end_radial_bearing_temp_1': 50.63657, 'pump_non_drive_end_radial_bearing_temp_1': 35.30093, 'pump_non_drive_end_radial_bearing_temp_2': 52.08333, 'pump_drive_end_radial_bearing_temp_2': 44.849540000000005, 'pump_inlet_pressure': 172.7431, 'pump_temp_unknown': 66.84028, 'pump_discharge_pressure_1': -1, 'pump_discharge_pressure_2': 195.6019}
But still I get the same Output as Dhyanesh97

Same problem here. Its intermittently working for me, with no logging or indication on why. It will periodically go into the panels state while other times it will simply show the same problems as @Dhyanesh97. This is without nested json values.

As a note, after installing the plugin via the grafana-cli I was able to resolve my issue. There may have been indirect problems caused through downloading it through the grafana gui (via the marketplace). Hopefully by changing install method it'd help someone else out!


This looks good

Kindly transfer this one over too, I'd love to make a release... I can see some users finding this plugin useful.

Please accept the collaboration invite, then I'll transfer the repo to you.

accepted, thanks


Piskel Profile Error Occured.

This keeps happening to me whenever I open the app.

Give #1049 a try. To run the desktop app directly, run the desktop-run command in your terminal (after installing dependencies using whatever package manager - npm, yarn, etc).


Bump version

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.002%) to 84.687%

Totals

Change from base Build<PHONE_NUMBER>:
-0.002%

Covered Lines:
11127

Relevant Lines:
13139

💛  - Coveralls


How to load shapefile layer with runtime 100

@wuhongsheng We do not as of yet support shapefiles with ArcGIS Android 100.0.0, we do have support with 10.2.x with ShapefileFeatureTable.


Investigate flaky test

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Test build #56502 has started for PR 12565 at commit b4e0393.

Test build #56505 has started for PR 12565 at commit 0f248ec.

Test build #2842 has started for PR 12565 at commit 0f248ec.

Test build #56502 has finished for PR 12565 at commit b4e0393.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56502/
Test PASSed.

Test build #56505 has finished for PR 12565 at commit 0f248ec.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #2842 has finished for PR 12565 at commit 0f248ec.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56505/
Test PASSed.

Test build #56558 has started for PR 12565 at commit 64447a4.

Test build #56558 has finished for PR 12565 at commit 64447a4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56558/
Test PASSed.

Merged build finished. Test PASSed.

Weird - it just passes ....

Test build #2860 has started for PR 12565 at commit a114466.

Test build #2861 has started for PR 12565 at commit a114466.

Test build #2862 has started for PR 12565 at commit a114466.

Test build #56788 has started for PR 12565 at commit a114466.

Test build #2862 has finished for PR 12565 at commit a114466.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #2860 has finished for PR 12565 at commit a114466.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #56788 has finished for PR 12565 at commit a114466.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/56788/
Test PASSed.

Merged build finished. Test PASSed.

Test build #2861 has finished for PR 12565 at commit a114466.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

OK I'm going to merge this since they have been passing for the past 3 runs.


Does SKIE support @ObjCName annotation?

First of all, congrats on make the tool open source :tada:. The Touchlab work for the KMP community is amazing! Great thanks for all the working of all you folks have being doing.
I was doing the first setup of Skie here on multiplatform project, it seems to have compilation issue in the generated Swift Extensions when trying to compile against a enum value that is using @ObjcName(swiftName = "..."). See the log below.
I also look into the Known Issues page but did not find the comment about this issue, this is why I'm openning.
path/to/the/project/build/skie/releaseFramework/iosX64/swift/generated/com.sample.module.HomeNavigation.OnboardingStep.swift:32:165: error: 'tohome' has been renamed to 'toHome'
    case .tohome: return __Skie.class_path_to_file_HomeNavigation_OnboardingStep.tohome as __Skie.class___path_to_file_HomeNavigation_OnboardingStep
                                                                                ^~~~~~~
                                                                                toHome
KotlinShared.__HomeNavigationOnboardingStep:7:20: note: 'tohome' was obsoleted in Swift 3
    open class var tohome: KotlinShared.HomeNavigationOnboardingStep { get }

The kotlin code:
public sealed interface HomeNavigation {
    public enum class OnboardingStep : HomeNavigation {
        @ObjCName(swiftName = "toHome") ToHome;
    }
}

SKIE Setup:
skie {
    features {
        group {
            SealedInterop.Enabled(true)
            EnumInterop.Enabled(true)
            DefaultArgumentInterop.Enabled(true)
            FlowInterop.Enabled(false)
            SuspendInterop.Enabled(false)
        }
    }
}

Thank you for opening this issue. SKIE is asking Kotlin for names of these classes, so it's interesting to see it's not resolving correctly. We'll definitely be looking into this and get it fixed in SKIE. Thanks!

@TadeasKriz I'm looking at the source code
I seem that it could be easily fixed by just switching getEnumEntrySelector to getEnumEntrySwiftName here: https://github.com/touchlab/SKIE/blob/main/SKIE/compiler/kotlin-plugin/src/kgp_common/kotlin/co/touchlab/skie/api/model/type/ActualKotlinEnumEntrySwiftModel.kt#L15
I tested locally here by publishing to plugin and fix the issue.

Hey @hamada14, thanks for reaching out. It shouldn't be needed as the getEnumEntrySwiftName returns the correct name each time. Tests are currently running for @DevSrSouza's PR, and so far everything is green and looks good! Once we get through all the tests (in about an hour and a half), I'll be releasing the PR as a new SKIE release.


Register

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/64008
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" cf120ff8b7ccb010621e5588eaf7ab65db499073
git push origin v0.1.0

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/64009
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 43b77491a73352a5eeb2bae3e5a40bd2e810463e
git push origin v0.1.0

Registration pull request updated: JuliaRegistries/General/64009
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 8de651c9b2b857c6963d4771b90af2f36ff7451e
git push origin v0.1.0

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/64032
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.1 -m "<description of version>" aac16d0a364c49eb562e78bbdf6f6b236934d6a3
git push origin v0.1.1

Also, note the warning: This looks like a new registration that registers version 0.1.1.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.


Is it possible to pass an adapter to an SFTTrainer and continue training?

A peft_config can be passed in, but is it possible to pass in an adapter and train it further?
Perhaps the best way is to pre-load the adapter onto the base model and then pass that peft model into the trainer (and not specify peft_config)?
Docs

Yes currently the way to perform this is to pass an already-loaded PeftModel to the SFTTrainer directly.
I agree this is not very clear in the docs, I can work on that!


[wip] fault-tolerant random state

What does this PR do?
Continuation of #8366
Before submitting

[ ] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)
[ ] Did you list all the breaking changes introduced by this pull request?

PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[ ] Is this pull request ready for review? (if not, please submit in draft mode)
[ ] Check that all items from Before submitting are resolved
[ ] Make sure the title is self-explanatory and the description concisely explains the PR
[ ] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃

Hello @awaelchli! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file pytorch_lightning/trainer/data_loading.py:

Line 133:13: W503 line break before binary operator
Line 134:13: W503 line break before binary operator
Line 135:13: W503 line break before binary operator


feat: Implement "Prefers Reduced Motion" Feature for Improving Accessibility 🪄✨

Description

We have a fantastic opportunity to enhance the accessibility of our project by implementing the "Prefers Reduced Motion" media feature.
This feature caters to users who experience motion sensitivity or discomfort, ensuring a more comfortable and inclusive user experience.

What is "Prefers Reduced Motion"?

"Prefers Reduced Motion" is a media feature in CSS that detects users' preferences for reduced animations and motion effects. When enabled, it informs the website that the user prefers a more static and less animated interface.

Why Implement "Prefers Reduced Motion"?

Enhanced User Comfort: By respecting users' motion preferences, we create a more enjoyable experience for those who may find motion-heavy interfaces uncomfortable or disorienting.

Improved Accessibility: Supporting "Prefers Reduced Motion" aligns with our commitment to inclusivity, making our project more accessible to users with diverse needs.

Compliance with Best Practices: Implementing this feature demonstrates our dedication to following web accessibility standards, fostering a positive and inclusive digital environment.

How Does It Work?

The media feature is used in CSS to apply specific styles when a user prefers reduced motion. This may involve reducing animation durations, disabling certain transitions, or creating static backgrounds.

Let's Prioritize Accessibility

At the heart of our project is a commitment to accessibility. By adding the "Prefers Reduced Motion" feature, we can create an environment where everyone can engage with our content comfortably.

Screenshots
https://user-images.githubusercontent.com/92252895/258685658-b03ca706-e9f7-4c77-b994-5227dd4ccfd3.mp4

[Sample working video to demonstrate the motion reducing feature]

@apoorvaron Can you review this Issue ?

@Ayushpanditmoto Review this issue


deploy_registry fails:

When attempting to deploy the OpenShift registry updating the IP tables fails, causing the stack create to fail:
https://github.com/redhat-openstack/openshift-on-openstack/blob/master/fragments/master-ansible.sh#L230
[cloud-user@oshift-infra ~]$ sudo iptables -I OS_FIREWALL_ALLOW -p tcp -m tcp --dport 1936 -j ACCEPT
iptables: No chain/target/match by that name.

Fixed by https://github.com/redhat-openstack/openshift-on-openstack/commit/83d5522a61e898c51cbc3fc499c2dcf02f564ee1

I'm a bit late on this one :-)
I don't understand why the iptables was set when $deploy_registry == "True" in the first place as it was related to the stats of the router.