Feat: Contentful request verification

Overview
Addresses ticket #231531
Implements signing key request verification for the Contentful webhook
Changes

Adds another authorisation filter to the cms endpoint for signing secret verification
Uses the pseudocode example in the Contentful documentation to add a method that can verify the requests coming in

How to review the PR
Setup

Make a Contentful change and then copy the request details from the webhook logs so you can post them to your local localhost:8080/api/cms/webhook endpoint instead of the dev one, using any tool you like (I like Jims suggestion of Bruno)

You should include all the headers
The request body should have all the whitespace removed, as this is how it would be posted to the endpoint by contentful
For example

{"metadata":{"tags":[],"concepts":[]},"fields":{"internalName":{"en-US":"Testing ye ol' webhooko"},"url":{"en-US":"Webhook.com"},"linkText":{"en-US":"Pls work"}},"sys":{"type":"Entry","id":"<content_component_id>","space":{"sys":{"type":"Link","linkType":"Space","id":"<space_id>"}},"environment":{"sys":{"id":"PlanTech_DevAndTest","type":"Link","linkType":"Environment"}},"contentType":{"sys":{"type":"Link","linkType":"ContentType","id":"csLink"}},"createdBy":{"sys":{"type":"Link","linkType":"User","id":"<user_id>"}},"updatedBy":{"sys":{"type":"Link","linkType":"User","id":"<user_id>"}},"revision":13,"createdAt":"2024-10-18T13:35:48.017Z","updatedAt":"2024-10-21T08:55:46.545Z"}}

Add a dotnet secret Contentful:SigningSecret and set it to the value from the keyvault
Make the request with Bruno/Postman/Something and the request should work

the TTL is only 5 minutes so if this takes longer just change RequestTimeToLiveMinutes to something longer for local testing

Testing

Check that the time to live works as intended, so if you leave the request for too long it fails
Check that it only works with the correct Signing Secret (so if you change it to some fake value, or remove it, verification should fail)

Release requirements

Create a signing secret for each webhook and add it to the keyvault for each environment

Additional notes
Will also need to update the webhook-creator code to include the signing secret
Checklist

[x] Title uses Angular commit convention
[x] PR targets development branch
[x] Unit tests have been added/updated
[ ] Terraform has been updated
[x] Documentation has been updated where relevant
[ ] Any Key Vault secrets have been added to the development Key Vault

Good work buddy!
Only thing I'd suggest is maybe using an IAuthorizationHandler instead of the IAuthorizationFilter. And only because they have an async method, so you can change var requestBody = new StreamReader(request.Body).ReadToEndAsync().Result; to use await instead. It's also the "modern" way of doing the authorization.

Ahhh thank you! I was wondering how I could fix it if the methods are async, I'll make that change.
Let me check on the stream reader


Implementing the new api into the Scanner

Checklist

[ ] I have read the FAQ
[ ] I have checked if this issue already exists (both open and closed issues)
[ ] I am using the most recent version of pogom from the master branch
[ ] If this is an installation issue, I am posting my OS, OS version, python version, pip version
[ ] I'm posting the complete log
[ ] I'm using a descriptive title for this issue

My Issue
Is there anyway to implement the new api into the pogom scanner? My coding skills aren't high enough to understand the scanner's code or to edit the code.
...

Good question. Not sure by when the new API will be released, but is PoGoM still under development?

I think so

Would be great. I like PoGoM, is my favorit app.

Wait it there a app for pogom

I've integrated the new api from Chrales, but it's kinda buggy atm, will do a PR once I fix most of the bugs.

the new api is live, lets hope it gets implemented soon!

yes please, pogom is the best scanner out there

If you are running on a 64bit version of linux, such as ubuntu, try this: https://github.com/PokeHunterProject/pogom-linux

Thx for that Paralysing, now just need to figure out how to get rid of the rate limited errors

Already patched for 0.45.0, will apply a few patches that I use on my website to minimize empty responses. I would also recommend using a lot of accounts.

Paralysing, a Windows version would be very nice. Would that be possible?

Yes, I'll see what I can do, shouldn't be too hard.

@Su9m7 Could you try to use https://github.com/PokeHunterProject/pogom-windows?

Yes, i will check it :)

Console crashes after starting it. Do I have to install the requirements.txt again or anything else?

Any specific error messages? Are you on a 64bit version of windows?

Yes 64bit Windows. Tried it on 2 pc's. Cant ready anything on the console, it crashes to fast

I'll check if there are any issues.

Added a patch for library path, could you replace the contents of pogom/utils.py with https://github.com/PokeHunterProject/pogom-windows/blob/master/pogom/utils.py

Also, try running the program in cmd with the command "c:\python27\python.exe runserver.py" instead of double clicking.

Windows instructions:

Hold shift and right click in the main folder, click "Open command window here"
In the command window, type "python runserver.py", if that doesn't work, try "c:\python27\python.exe runserver.py"

Stuck at this https://picload.org/image/rdppridr/unbenannt.png

Go to localhost:5000 in a browser and configure the map, the rest is exactly the same as the old pogom.

Working, thanks a lot, you legend

btw would it be possible to implement pushbullet notifications? https://github.com/favll/pogom/pull/317

Should be fine if you want to implement it yourself, that PR doesn't affect the api, so there shouldn't be any conflicts.

It crashes after the changes, error message says its because of the changes in runserver.py. Do you have any idea how to solve that? :/

I'll implement it myself and check, might be because that PR is based off a very old version of pogom, but I'll need to test it first.

I got a running application, but I don't have a pushbullet key, could you try the "pushbullet-test" tree (https://github.com/PokeHunterProject/pogom-windows/tree/pushbullet-test)?

@Su9m7 Does the "pushbullet-test" branch work?

Sorry, still testing, propably not

the pushbullet key is old, creating a new one and i will test it again

Also, remember to change the "mobilealert = {1,2,3,4,5,6,7,8,9}" in models.py to the actual things you want to be alerted about.

Working, checked that before and added Pidgey to test. The PB key was too old

Again, thanks a lot @Paralysing

No problem.

getting nttn but rate limit, new accounts, new key. ideas?

Softban maybe? Only tested it with 4 Locations and 2 accounts over the night without any problems. How many locations and accounts do u use?

managed to get this installed but it wont scan. when I click on the map nothing happens, I don't get a pin point.
also it says on the setting page "no scans yet"
Any Ideas?

for some reason its authenticated but I cant click on the map to start a scan. I don't get the pin point.
any ideas?

@MartynTech Could you try going to localhost:5000/login?

Also, there was a banwave earlier in the day, make sure the accounts you use aren't banned.

I can login to the config page okay.
I only created the accounts with ptc-acc-gen about an hour ago so they shouldn't be banned.

So your only issue is that when you click on the map, no pin appears?

yes, no pin appears and no scans take place.

Could you go to the config.json and try adding {"latitude": (your latitude here), "altitude": 0, "radius": 200, "location": "(your latitude here),-(your longitude here)", "longitude": (your longitude here)} in SCAN_LOCATIONS?
Ex: "SCAN_LOCATIONS": [{"latitude": (your latitude here), "altitude": 0, "radius": 200, "location": "(your latitude here),-(your longitude here)", "longitude": (your longitude here)}]

Forgot that I kept the "-" in, {"latitude": (your latitude here), "altitude": 0, "radius": 200, "location": "(your latitude here),(your longitude here)", "longitude": (your longitude here)} should work.

okay, I get a point in my area now however I still cannot move the area to search.
Also I get errors saying that its rate limited. no Pokémon are found either.

Not sure what's wrong with the point, have you done any modifications? Also can you redownload map.js in the static folder? The rate limits are caused by scanning too fast and having too little accounts. Since pogom was made for scanning fast, you will need a decent amount of accounts to prevent being rate limited.

I greatly improved the rate limit issue by adding the following:
scan.py - Line 84 - time.sleep(1)
This adds a 1 second delay between each scan attempt.
FYI, I have 26 account scanning a 1km area. Also ensure all accounts have been logged in via the official mobile app and have completed the initial training and chosen a nickname, this all help to look less "bot'y"

How many account do you use? I've got only

2016-11-15 17:16:48,078 [     models] [WARNING] Received valid response but without any data. Possibly rate-limited?

👎

Using approximately 100 accounts to scan my city, I'm assuming you're on the 0.45.0 version.

@Paralysing I have re cloned the repository and still cannot click on the map. any more ideas?
Thanks

I would probably think there is something wrong with login, I'll try and make a branch which removes login completely.

Also, try to reinstall requirements.txt with the --upgrade argument.

@Paralysing i'am tring in w10 but i have all empty scans with last git pogom. can help me?tks

@m3g4mInD How many accounts are you currently using  and how large of an area are you scanning? Due to niantic's new speed limits, you now need a lot more accounts than previously.

@Paralysing  i have quit with w10 and i started with ubunut and first try voila all work fine,now i need to understand how avoid the captchas  and thanks for your cool repo xd

hmmm I have installed on windows and whenever I try to start runserver.py I get the error below. any ideas where I'm going wrong? all requirements are installed correctly, as well as node.js
C:\Users\VM\pogom-windows>python runserver.py
Traceback (most recent call last):
File "runserver.py", line 13, in
from pogom.app import Pogom
File "C:\Users\VM\pogom-windows\pogom\app.py", line 18, in
from .scan import ScanMetrics, Scanner
File "C:\Users\VM\pogom-windows\pogom\scan.py", line 16, in
from pgoapi import PGoApi
File "C:\Users\VM\pogom-windows\pogom\pgoapi_init_.py", line 52, in <module

from .pgoapi import PGoApi

File "C:\Users\VM\pogom-windows\pogom\pgoapi\pgoapi.py", line 38, in
from .rpc_api import RpcApi
File "C:\Users\VM\pogom-windows\pogom\pgoapi\rpc_api.py", line 46, in
from .utilities import to_camel_case, get_time, get_format_time_diff, Rand48

, long_to_bytes, generate_location_hash_by_seed, generate_location_hash, generat
e_request_hash, f2i
File "C:\Users\VM\pogom-windows\pogom\pgoapi\utilities.py", line 47, in
nhash = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(os.path.realpa
th(file)), "lib/libniantichash-windows-x86-64.dll"))
File "C:\Python27\lib\ctypes_init.py", line 440, in LoadLibrary
return self.dlltype(name)
File "C:\Python27\lib\ctypes_init.py", line 362, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application

Are you on a 64bit version of windows?

yes 64 bit.
I have managed to get round the issue now, it was a 32bit python build I installed.
I'm still having my original issue now of not being able to click to scan on the map. This is a fresh windows 7 build too.
you mentioned something about bypassing login?

Sure, I'll give you the instructions after I look through the code.

@MartynTech Replace the code inside pogom/app.py to https://gist.github.com/Paralysing/5ab3412e56b516381bdf917a3424b2e0

@Paralysing thanks for that, I have updated and still cannot click on the map though.

Does the left tab say authenticated?

yes it does. managed to sort it. it was a damm glitch in IE10!
is there a way to have the map centre on your location if accessing on a phone?
thanks

You would have to use an https connection for any browser to allow you to center location, slightly complicated since you would need a domain. Try using https://github.com/favll/pogom/pull/146

Niantic forced updated the client to 0.47.0, as of now, using the scanner is dangerous and may result in account bans.

ill take a look into 146. I do have a domain that I can setup for https.
and thanks for the heads up. I rushed to stop the server as soon as I saw your message!

No problem, next time I release an update, a warning will show up whenever the scanner api isn't up to date.

Working on patching pogom for 0.51, I'm not at my normal setup so development might be slower. Will hopefully be done soon.

@Paralysing  thank you , you have made a nice job until now and i'am here to test and find bugs :)

Surprisingly, finished patching in a few hours. Going to finish stability checks and I'll release it.

For anyone still using pogom, https://github.com/PokeHunterProject/pogom-updated is where the code running on the 0.51 api is hosted. Use the -k argument to enter your hashing key, use -sd to put a delay between getmapobject requests.

@Paralysing  thanks for you great work, i gonna try today and give you return :)

I have an API key and installed it. However when I try and scan I get a message saying that a response is received but has no data. any ideas?

Operating system?

windows 7

I'll boot up a w7 laptop and test it.

thanks

Found the issue, I pushed my test version without the new libs, I'll update it now.

Redownload the repo and try again?

it appears to be working now thanks.
What would a good scan delay be as I have mine set at 30 and its pretty slow with 150 accounts.

I usually either use 1ms or 0, the hashing server slows everything down due to the latency.

The delay was mostly to make sure that the requests don't get throttled by the hashing server.

right okay, I have set mine to 5ms and i'll see what happens. it was the 150RPM key I purchased. I'm thinking that was a mistake now and should have gone for the 500.

how can I add the ability to use current location on the map? I have a domain I could use for SSL

Setup SSL, the map will automatically geolocate when you allow it to access your locations.

how do I enable SSL on the map?

A free option is to use cloudflare ssl or you could buy an ssl certificate, but cloudflare should be enough.

i have added my domain to cloudflare, do i need to install a certificate or anything into the map?

No, just need to enable the cloud button on the dns settings and set ssl to flexible in crypto.

Also, for anyone still using pogom, pull the latest version, BuddyAuth changed the endpoint for hashing, so we had to edit the url we were sending and recieving with.

@Paralysing thx for the great work. Can you update the readme with the new values -k and -sd so we dont need to search for them.
And wouldnt it be better to switch the conversation to the ongoing repo than still writing here?

Sure, I'll update the readme, would be great if I could get maintainer on this repo so everything doesn't need to be shifted.

And if not possible, just shift it and who still wants to use it will follow.
Did you pull the IV and password pulls in your repo or is it the plain one, because I would like those implement if possible for them IV with filter and on/off switch

The version I released is without any addons, as long as the pull requests don't affect the api too much, they should still be able to be merged manually.


Support adding to queue

Support adding to queue

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.72%. Comparing base (8bdc153) to head (b27c393).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #302   +/-   ##
=======================================
  Coverage   99.72%   99.72%
=======================================
  Files           4        4
  Lines         361      366    +5
  Branches       45       46    +1
=======================================
+ Hits          360      365    +5
  Misses          1        1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


F-Droid build failed

There is a binary file at app/src/main/assets/models/Avocado.bin. What is it? How is it generated? Thanks!

Hi @linsui
Avocado.bin contains the 3d model data.
bin gltf glb are all file extensions related to open source gltf 3d format

Then I'll add it to scanignore. Thanks!

thank you @linsui
for your information
the Avocado files were copied from the khronos public github (public license)
https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/Avocado/glTF
regards

The build failed with another error. See https://gitlab.com/linsui/fdroiddata/-/jobs/3130816693. Could you please take a look? Thanks!

Hello @linsui
In the stacktrace I see 1 error about dex 64k limit
I had the same issue locally and I put multiDexEnabled in the app so it should work for you as well
However, I think I missed something
https://developer.android.com/studio/build/multidex
Let me check that and come back to you


Default theme v0.1

User story
As a user, I want to be able to start with a basic page layout to publish my content.
Acceptance

[ ] Front page basic layout

[ ] Nice hero
[ ] Rest of page can be markdown (just nicely styled) - cf syntax example after special links section is fine

[ ] Rest of pages - have standard markdown styling
[x] Navbar ✅2022-07-14 it's working
[x] Footer ✅2022-07-14 working now

Bonus
~* [ ] Work out how we refactor this out of the default template (or maybe leave as default template?)~ Let's treat this as our default template for now, as we don't have any other templates yet. In the future we cant create other ones and here is the issue for that. (For reference: this issue was previously named "Theme Flowershow Website").
Tasks

[x] Choose a basic theme to use ✅2022-07-08 can try-out tailwind theme e.g. "Syntax"
[ ] Do a teardown on the theme to understand how it works (put in e.g. hackmd)
[ ] Work on front page using MDX and basic copy we have
[ ] Navbar:

[x] Refactor nav component as in theme template ✅ 2022-07-11
[x] Add component MobileNavigation.js

[x] Hero:  as per 12/07/22 meeting:  let's just use raw HTML instead of creating react components

[x] Add components  Hero.js Button.js ✅ 2022-07-11
[x] Use Hero component in site/content/index.md
[x] Image for hero

[x] Have logo in navbar and footer etc ✅2022-07-14 have a decent placeholder. More work in #33
[ ] Sections
[x] Fonts Use default from template

Notes

While adding raw html in index.md for Hero, some styles were not being implemented. On further investigation it turns out that additional
 tags are added to the html based on formatting. for eg in markdown ..

    // extra
 tag added to below text on new line and styles from above not applied
    Some example text here

Some example text
 // styles applied here and no extra
 tag

How are we handling images for users ? Maybe makes more sense to symlink in public/images for now .. ?
Another way to add components in frontpage can be in the layouts section. For eg. index.md can have the docs layout but the Hero component will only be available for index page.

export default function Docs ({ children, frontMatter, components }) {
  return (

	{frontMatter._raw.sourceFilePath === "index.md" && <components.Hero />}

	  {children}

  )
}

This concept was taken from the tailwind docs theme template (which uses markdown) and we may be able to control rendering of components.

@khalilcodes somethings off here as well. Could you please look into it? :slightly_smiling_face:

Fixed!


Add files via upload

@TdHou123 Regrettably, this request has signs of fraud. I have to close it without merging.


Commenting out grey out excess text

atom 0.209
language-haml 0.21

= foo
- if link_to "Home", root_path
  %div

I believe that the - and root_path at the 2 line shouldn't be greyed when I comment out the 1st line.

Hitting this issue as well.

+1
this is extremely annoying issue. the next line after the comment gets comment's CSS classes like it was a commented line. but it's not.

Same here, in HAML with Rails, if I comment out a line with -# or / or // the subsequent line in italics and some text greyed out as well.

+1
I think my issue is quite related:
Atom: 1.0.2
language-haml 0.21
%a.tab#pricing-tab{ href: '#pricing', data: { toggle: 'tab' } } Pricing/Availability
Whole #pricing-tab and text to the end of the line is grayed out as comment.

+1

+1

+1 with haml native comments

See #20 for current progress on this issue.

Should be fixed in 0.22.0.


⚠ Processors has degraded performance

In f59ad97, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 93 ms

Resolved: Processors performance has improved in de3e352.


Add tests for no tabs and no texts

This pull request adds tests for scenarios in which there are no views in the dashboard and therefore no tabs or when the user has not set titles in the views so therefore the tabs will not have texts.

Note: as part of this pull request, the tests have been separated in different files.

coverage: 100.0% (+2.0%) from 97.959%
when pulling 89ea12c3f7075a59a8e8b6e7f43202e84b412d63 on add_tests_for_no_tabs_and_no_texts
into 805b1a7f3cf534fb0b5954e42258ea52d9956572 on master.


Add core dump for ruby 2.7.2

This supports https://github.com/rbspy/rbspy/pull/282. I tried adding C symbols to the existing test case for 2.5.0-rc1, but its global symbols table seems to be either invalid or not fully accessible by gdb.
The core dump was generated using gcore on Linux against a ruby 2.7.2 process that was running ci/ruby-programs/infinite.rb from the rbspy repo.
cc @jvns :pray:

Thanks so much for this! Sorry for the slow reply.

No worries. Thanks for building all of this neat tooling :)


tokenizer separator regex

Hi! I am adding some custom regex to our tokenizer.separator:
lunr.tokenizer.separator = /[\s\-\.\(\)\[\]+\A-Z]/;
According to regex101.com, [\s-.()[]+\A-Z] will match all the capital letters in DeleteStreamAsync. I would like it to split on those, so that, for example, "DeleteStream" will return results.
Everything else is matching fine. For example, the stuff I added so that DeleteStreamAsync(someParams) would be returned when searching DeleteStreamAsync. So it's splitting on ( at least. It just doesn't seem to like the A-Z.
Any suggestions/info much appreciated.

Hi @StarfallProjects - just to make sure I understand you correctly, you essentially want to split up DeleteStreamSync(fooBar) into a stream of tokens Delete Stream Sync foo Bar, right?
Tweaking lunr.tokenizer.separator this way will kind of work - you'll end up with a token stream consisting of elete tream ync foo ar, though.  Which means searching for "delete bar" won't turn up any search results, and looking for "Delete Bar" will have the same results as "Delete Car".
If my understanding is correct and you want to use lunr for this, I'd recommend providing a custom, camel-case-aware tokenizer function to the lunr builder - I think you'd have better luck with that.
However, I've noticed a few of your issues seem to revolve around searching source code, and I'm not sure lunr is particularly well-suited to that.  Is there a specific reason you chose lunr?

Thanks for the advice.
I only joined the project recently - but it uses DocFX, which has lunr.js built in.

Ah, I see - so it might be unreasonable to just yank lunr.js out and replace it with something entirely different!
With that in mind, I'd recommend trying to write the custom, camel-case-aware tokenizer I suggested above, and see how that works for you!

Thanks!


Bug when triggering autocomplete suggestions programmatically

I wrote some code to get the autocomplete suggestion box to show up when a new key is being defined in the Monaco json editor (so you don't have to start typing to see suggestions, you can just see suggested keys available to you when you first type the quotes of the key). This code programmatically triggers the suggestions box to show up using the code pasted here by @alexdima.
Unfortunately, this code exposes a bug: if you trigger the suggestions box programmatically, then start typing (which would trigger the suggestions box to show up anyway) and then accept a suggestion, the auto-fill gets messed up. In the Monaco sandbox, it seems to remove the first character after the autofill insertion. In my environment, for some reason it inserts an extra double-quote character right after the autofill insertion (gifs attached below). But I'm guessing these issues are related, so the sandbox code and replication instructions are included below.
As you can see in the attached gifs, triggerSuggest is only triggered when the empty quotes are first added (which is the desired behavior) -- afterwards when you are typing and accept the suggestion, the console does not print "TRIGGER". So for some reason, programmatically triggering autocomplete suggestions causes some delayed effect if coupled with typing out part of the suggestion (which should trigger the suggestions list to show up on its own) to mess up the autocomplete code insertion. I wonder if it's some sort of interaction/interence between the typing-triggered suggestions and the programmatically-triggered suggestions?
Does anyone have any suggested workaround for this?
GIFs of the bug in my environment, plus console output:
Bug (note the "TRIGGER" printout in the console):

Normal Behavior:

Playground code that reproduces the issue:
(Note: to reproduce, try adding the "description" key by first adding the open quotes "" and then typing out "desc" and then accepting the suggestion -- the bug won't occur if you accept the suggestion before typing anything... then comment out lines 51-54 and the bug will disappear)
https://microsoft.github.io/monaco-editor/playground.html
const editor = monaco.editor.create(document.getElementById('container'), {
  model: monaco.editor.createModel('{}', 'json', monaco.Uri.parse('file:///resource.json')),
  automaticLayout: true,
  quickSuggestions: { other: true, strings: true },
});

monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
  enableSchemaRequest: false,
  validate: true,
  schemas: [
    {
      uri: 'file:///resource.json#schema',
      fileMatch: ['file:///resource.json'],
      schema: {
        $schema: 'http://json-schema.org/draft-07/schema#',
        $id: 'https://schema.com/config/analytics/insight',
        $version: '1',
        type: 'object',
        title: 'Insight',
        description: 'Configures an analytics insight.',
        properties: {
          $id: {
            type: 'string',
            minLength: 1,
            maxLength: 97,
            description: 'The unique identifier for the insight resource.',
          },
          $schema: {
            const: 'https://schema.com/config/analytics/insight/v1',
          },
          name: {
            type: 'string',
            minLength: 1,
            maxLength: 100,
            description: 'The human-readable name of the insight.',
          },
          description: {
            type: 'string',
            minLength: 1,
            maxLength: 500,
            description: 'A description of the insight.',
          },
        },
      },
    },
  ],
});

editor.onDidChangeModelContent((event) => {
  const value = editor.getValue();
  if (isDefiningNewKey(event, value)) {
    editor.trigger('', 'editor.action.triggerSuggest');
    console.log('TRIGGER');
  }
});

/**
 * This function infers whether the change corresponding to the given event is defining a
 * new json key.
 *
 * @param {IModelContentChangedEvent} event the change event
 * @param {string} value the editor's current value
 * @return {boolean} true if the change is defining a new key, false otherwise
 */
function isDefiningNewKey(event, value) {
  if (
    event['isFlush'] ||
    event['isRedoing'] ||
    event['isUndoing'] ||
    event['changes'].length !== 1
  ) {
    return false;
  }
  const change = event['changes'][0];
  if (
    change['range']['startLineNumber'] !== change['range']['endLineNumber'] ||
    change['text'] !== '""'
  ) {
    return false;
  }

  // Get the change position (subtract 1 to convert to 0-index)
  const lineNumber = change['range']['startLineNumber'] - 1;
  const columnNumber = change['range']['startColumn'] - 1;

  // Get the text strictly before the change position
  const lines = value.split('\n');
  const lastLine = lines[lineNumber].slice(0, columnNumber);
  const textToSearch = lines.slice(0, lineNumber).join('') + lastLine; // ignore \n

  const lastNonWhitespace = unpackOrNull(textToSearch.match(LAST_NON_WHITESPACE_REGEX));
  if (lastNonWhitespace === '{') {
    return true;
  } else if (lastNonWhitespace === ',') {
    // We could be in an array
    let netLeftCurlyBracketCount = 0;
    let netLeftSquareBracketCount = 0;
    for (let i = textToSearch.length - 1; i >= 0; i -= 1) {
      switch (textToSearch.charAt(i)) {
        case '{':
          netLeftCurlyBracketCount += 1;
          break;
        case '}':
          netLeftCurlyBracketCount -= 1;
          break;
        case '[':
          netLeftSquareBracketCount += 1;
          break;
        case ']':
          netLeftSquareBracketCount -= 1;
          break;
      }
      if (netLeftCurlyBracketCount === 1) {
        break; // Found the beginning of the object we are in
      }
    }
    return netLeftCurlyBracketCount === 1 && netLeftSquareBracketCount <= 0;
  }
  return false;
}
// Helper regex and functions for isDefiningNewKey
const LAST_NON_WHITESPACE_REGEX = /[^\s](?![\S\s]*[^\s])/; // matches the last non-whitespace character
const unpackOrNull = (array) => (array && array.length > 0 ? array[0] : null);

@mureytasroc Why aren't you using trigger characters for this?


update NewErrorAcknowledgement

practically, it is hard to debug the issue e.g. on ICA tx failure, as it is only returning see the event logs, and I recommend to update this function to precisely show the issue - for normal transactions, such issue is exactly shown.

Hi @mdanny1209, unfortunately this change would lead to non-deterministic error messages if the error strings ever change. We intentionally use a hard coded string and only include the (deterministic) ABCI code.
This is only an issue since Acknowledgements are written to state. (see the note in the docstring for more details)
Perhaps instead to aid debugging we could add additional logging with the concrete error?

yes, so that the error log could be found on host chain daemon log.

Hi, thanks for the PR! The error is already logged here, please let us know if that helps.

Hi, thanks for the PR! The error is already logged here, please let us know if that helps.

It would be good to add special message like 27-interchain-accounts: recv packet handling error  so that it can be easy to check the log.
On ICA product development, debugging the failure takes a lot of time, and this simple log change would reduce a lot of time debugging.


Match Google Chrome Sec-Ch-Ua hints

Describe the bug
Certain websites check the value of this header field and refuse auth if it's not as expected.
To Reproduce
Steps to reproduce the behavior:

Attempt login on a website
Auth fails
Open Developer Tools, then Network conditions from 'More tools' under three dots
Fill user agent client hints as below

Try to auth again, it should succeed

Expected behavior
Authentication works
Screenshots
See reproduction steps for screenshot
Desktop (please complete the following information):

OS: Windows 8.1
Bitness of browser: 64-bit

Additional context
N/A

??? 1567f0771c50bf0f79f9115cccfa3ed2fba88fbf
what version of browser are you using?

??? 1567f07 what version of browser are you using?

I am using the current Supermium 124 release.
To provide clarification regarding the issue, Supermium doesn't include the hint titled Google Chrome

can you share affected site?
i know one example but after changing version to 127 issue gone (i use extension for UA so noticed it regrdless of supermium fix :D )

I have privately shared the website with Supermium's author as it is not intended for people outside of a specific region.
I was able to identify the issue by comparing request headers between Supermium and a copy of Google Chrome 126.

... By the looks of it, the "affected website" ONLY sanctions official Google Chrome and no other browser for its log-in feature, if it goes to such extreme measures to exclude the rest of the browser market :-1: (and what about Mozilla Firefox, which doesn't yet support CH ?); this is blatantly promoting a browser monopoly :rage: and in my region of the world (European Union), this is totally unacceptable; such site practices, when they operate within the EU's jurisdiction, can be reported to high level anti-monopoly EU bodies, possibly resulting in serious measures (blocks, fines) against those sites if they don't comply with what the EU web-laws dictate) ...
But I suspect the "specific region" the site in question operates in is being oblivious to net neutrality :disappointed: ...

... By the looks of it, the "affected website" ONLY sanctions official Google Chrome and no other browser for its log-in feature, if it goes to such extreme measures to exclude the rest of the browser market 👎 (and what about Mozilla Firefox, which doesn't yet support CH ?)

Actually the site in question works fine under Firefox.

I will change the default for Sec-Ch-Ua to "Google Chrome". I think this may also help with some other website compatibility issues and reduce the fingerprinting surface of Supermium. And also introduce the option from ungoogled-chromium to disable UACH altogether, as well as options to report as Windows 11, iOS 17, Android latest version or macOS 15.

@win32ss is it possible to give us an ability to choose between defined presets and manual editing, that will affect all related places such as headers, js objects, etc?

@win32ss is it possible to give us an ability to choose between defined presets and manual editing, that will affect all related places such as headers, js objects, etc?

Yes, I will add the option to fully customize UA and UACH for each site, as well as a default option. The functionality for that on Supermium's end will be added in the third commit (the one I just made changed the defaults, the second will add the ungoogled flag, and the third will add the support for user-defined UA/UACH).

Unfortunately there are issues passing the site-specific UACH override to the renderer (specifically, the URL information that is available at HTTP header creation is not available at renderer creation), which means that it is only reliable for UACH information transferred by the HTTP header and not by JavaScript. With this in mind, I can only implement one default override.

5d0998b

:tada: ! Will the old cmdline switch --disable-features=UserAgentClientHint, that used to work up until (and including) M121, apply there, too, or is a new one being proposed? For the less initiated, will a chrome://flags GUI setting become available too? :wink:
Many thanks in advance :+1: ...

Yes, the old switches will be available.


Hoisted or aliased variable issue with webpack

My build with webpack and babili produced that kind of code
var _Mathround = Math.round;
webpackJsonp([11], {
    1022: function(a, b, c) {
        'use strict';
        var d = c(0)
          , e = c(7).sprintf
          , f = c(3)
          , g = c(1023);
        a.exports = {
            getFoo: function(k, l) {
                return _Mathround(k.score);
            },
            ...
        };
    },
    ...
});

with this error TypeError: _Mathround is not a function
Chrome devtool sees _Mathround as a Global variable when I try to debug, but it is undefined

var _Mathround = Math.round and _Mathround is undefined during debugging ?. Not sure what the issue is.
But, this has changed recently in #472 - where it doesn't add to global, but to some parent scope which is not global. Not sure that would resolve this issue.
Are you able to reproduce it in the REPL ?

We didn't release the fix yet and REPL has 0.10.0 which doesn't have this feature
@JSteunou Can you try this with latest babili master if possible?

I tried to test with latest babili master but

npm install babel/babili do not work, I guess because this is a lurna repo
I manually replace babel-plugin-minify-builtins/lib/index.js with master with no luck: ERROR in unknown: parent.get(...).unshiftContainer is not a function I guess it depends on other things

for now setting builtIns to false set the trick

Alright, we will probably release a minor version with some fixes soon, Hopefully that will help.


IE11 bug - layer bleed when focusing on controls within modals

Hi,
Found this bug, when using a modal window on IE11, and using controls within that modal (such as List, TextField, Checkbox, etc..). When the controls gain focus there is bleed from background components on the underlying zCanvas - can be anything in the background.
You can see it on the Zebra demo at http://repo.zebkit.org/latest/tests/win.test.html in IE11 - create some modals and then click on the the select lists whilst other modal windows are underneath, then move your mouse to the header of the modal - the borders of the underlying modals bleed upwards.
Thanks in Advance

Update : Anything where you are doing a mouseover on a text element seems to initialize the bleed effect.

I get this too and it's not just IE, firefox and chrome can also get it, my solution for various "bleeds" and canvas artificacting that happen has been to hook up a repaint function to various actions. I use the mouseEnter and mouseLeave events over panels, modal open/close and dragged, combo bind along with others..., and while firing off repaints might seem innefficient, I don't really notice a reduction in client side performance, and it keeps the canvas nice and clean.

I do sometimes see a bit of border bleed on other browsers, the trouble with IE11 is it's much worse. I have ImagePans underneath a modal and the whole image will suddenly pop into view the moment the user rolls over some text inside the modal. I've added mouse events to repaint the panel but as the trigger seems to be text rollover it doesn't stop the bleed being noticeable to the user.

Are you using the latest version published on web site, or GITHUB version ?

Got me there, I'm using a customized version on my project which I've tried to patch with your latest updates. One of the worst things for the bleeding seems to be the pkg.Link class, I updated the stateUpdated method where it calls repaint to the following :
        var visualCanvas=this.getCanvas();
        if (visualCanvas!=null && visualCanvas.root!=null) visualCanvas.root.vrp();
        else this.repaint();

Does the example at http://repo.zebkit.org/latest/tests/win.test.html use the latest code? I will email you my version, but have only been updating the core zebra.js rather than the sub-module files. I changed it to do various things slightly differently, mainly so I could the Excel like grid to work with the core code, deal with touch differently and based on a Green theme (we are also moving away from Bootstrap and needed to make some of the controls look similar). Think it has most of your recent updates (not your touch one though) but could easily be wrong.
Also have written a auto-correction extension for TextField which I'll email over too.

Win test demo uses the latest published on WEB site version. GITHUB contains continuously (and quite stable) developing version of zebra that differs from the latest. As soon as all planned things will be done in GITHUB version it will be represented as the latest. I would suggest to stick to GITHUB version, since it is getting a lot of changes, fixes, improvements.
Regarding Excel: have you seen mockup http://repo.zebkit.org/dev/office/office.html (GITHUB contains  more stable version in "samples/office" folder) ?
Few questions:
Do you have the problem mainly in IE or other browsers also shows the problem ?
Do you run win test on retina screen (with DPI > 1) ?
Which OS do you use ?
Any source code, snippets are highly appreciated. It helps to fix the problem faster (but IE can be really weird and annoying case). Earlier I already have noticed that sometimes IE can leave small traces (have tried to fix it with extending repainting area by one pixel), but what you describe looks much worse.

Yes, it was that Excel office demo functionality I integrated to the core so can have sortable columns at the same time. The demo code seemed quite old with a different module structure. I've emailed you over my custom code to your 'ask' address.
I'll try the win-test on the Github code and see if I can see the same bleed.
Mainly the problem is IE, other browsers are fine, only thing I occasionally see on other browsers is a bit of border pixel bleed, whereas on IE whole images will bleed upwards.
I'm mainly running under Windows7 on normal ('100%' DPI), I've tested this problem on two different machines, both running Windows7 and same thing occurs. Also test on Chrome, Firefox and Safari on Mac and iOS and don't see this problem.
One thought, in the code there is the comment  "// fix for IE10/11" under which is a wrapper for g.fillRect(), could a similar issue occur for g.fillText()?

Thanks for information.
You can send source code to<EMAIL_ADDRESS>

Sent the code again, sometimes my emails get lost on my default ISP. Please let me know if still not got anything.

Have not got your e-mail.

Sent again, might help if I zip up the .js files...

Yes, I have got it.
I have noticed one strange thing, not in your code, but in IE11 + Win7 in general. Probably it has only partial relation to the problem. What I see is mouse pointer (x, y) coordinates that is coming in mouse events handlers are not integer values. They can be float. That happens because the original pageX, pageY coordinates in native mouse/pointer event are float.
Could you test it on your side ? To do it you need put "console.log("Mouse:" + e.x + "," + e.y);" in mouse dragged event handler of "zebra.ui.Window" class, than move window and inspect console output.

Have three test results :

The issue with http://repo.zebkit.org/latest/tests/win.test.html still exists with the latest Github code. Note, you don't need to drag windows, just opening up a few modals on top of each other and then mouse over text followed by modal headers seem to trigger it. The whole border area bleeds through.
Added the console logging to the pkg.Window drag event and see only integers for the e.x and e.y values.
On my particular app, this is the most weird..with the latest Github code, the images that were causing the biggest issue on IE still appear in Chrome but on IE are not rendered at all, meaning I cannot reproduce the issue from there anymore.  May have something to do with CompositeView replacing Composite class, that will be the first thing I'll check...

Found the answer to the mystery in my last post, you are checking now in an extra 2 places in the code for an image's 'naturalWidth' property being greater than zero. Looks like for images containing SVG under IE the 'naturalWidth' property is always zero. These are the images that seem to always bleed through as well, I have a setSize method for them, so that should work, don't know where else it could be querying the size and getting the wrong answer?

I get the following issues, 1) on OpenSuse Linux with Firefox - leading edge text gets chopped alot..

I also get crazy bleed through on modals when using something inside the modal like a combobox on win7 IE 11 like this:

Regarding the text, could you try to use another font ? In some cases, for some fonts metrics can be calculated wrongly (by 2DContext of HTMLCanvas).

Looks like this is still an issue on Windows10 Edge browser. So not exactly a complete web standards rewrite as MS is reporting.


allow_force_push flag is always disabled, with no way to configure

Problem Description
When branch protection is applied/enforced by safe-settings, the allow_force_push flag is always reset to 'disabled', and it appears there's no way to configure this setting for a repo.
What is actually happening
See above
What is the expected behavior
Wither 'allow_force_push' should not be changed if it is not configured by safe settings, or there should be a way to configure it in the repo protections file.
Context
Are you using the hosted instance of probot/settings or running your own?
Running our own
If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com
Version of probot/settings
1.1.9
Version of GitHub Enterprise
N/A

@decyjphr: Any idea when this will be fixed?  We added a custom configuration for one branch like below in the YAML file and it is not reflected in GitHub
protection:
  allow_force_pushes:
    enabled: true

I'll take a look at it tomorrow and let you know if it can be fixed quickly. Thanks for raising this.


Delete spring-security-oauth dependency

See https://github.com/jhipster/jhipster-bom/pull/257#issuecomment-817840780

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.dfranco seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@mraible Done! ;)


Update UG

Closes #141
Update user guide to include 'school' as a contact type

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
see 13 files with indirect coverage changes


Sites should be able to allow open PWA access

The current spec'd pwa-site-association file doesn't allow for a site owner to openly allow any PWA to handle it's URIs (or a subset of them).  I think to remedy this, wildcard support should be added to the 'manifest' field of this pwa-site-association.
Though I don't think this would be common for most sites, I can imagine some testing and education scenarios, as well as some open-source communities that may want to open this ability to everyone.

@mhochk, can you provide a strong example here?  This sounds pretty dangerous to me.  With one mistaken configuration property added to a manifest for a banking site, all of a sudden any PWA would be able to register as its URL handler and potentially spoof the site.

Closing here. Please continue the discussion here: https://github.com/WICG/pwa-url-handler/issues/3


Disable Origin Policy CORS in Flutter web

Use case
While calling a web service on Flutter web it will not work because of CORS Policy
Proposal
I saw a chrome window when I start debugging a Flutter web application
I wonder if we could add a flag to disable the CORS policy
like Flutter run -d web --no-cors
chromium-browser --disable-web-security --user-data-dir="[some directory here]"
https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome

Disabling the CORS checks locally would lead to drastically different behavior between a debug and deployed application - you can't very well ask all users of your website to disable CORS locally. Adding this flag would be a mistake

@jonahwilliams I wonder why web services work in Android debugging mode while there is no Internet permission in the Manifest file?

For sure the simple answer is easy debugging until adding the permission for the release version

This is not an "injection" at build time, but rather a separate manifest for debug builds
https://github.com/flutter/flutter/pull/22139

Internet Permission for Android is the same as CORS in Chrome

It is absolutely not the same thing

@amreniouinnovent flutter web working locally and remotely ? I am also facing this issue with flutter web but it works fine on Mobile

@krunaldarji it is not a bug. it is security permission like when you call twitter from facebook then facebook is not allowed to call twitter.
So backend developer should allow you to call his web service from your localhost.
this security feature is for browsers only but not on mobile or postman.

@jonahwilliams developers suggested using an extension or opening chrome with CORS disabled
So I have 2 questions:
1- Why the app is not launching as a new tab in the same browser? and is there any possibility I can change the default behavior? because the chrome instance which got launched doesn't have extensions like my default chrome.
2-How could I configure the app to run on Firefox instead of chrome?

For the future, if we can launch in Firefox by default
open in the address bar about:config
then search for  security.fileuri.strict_origin_policy and make it false

@amorenew But i hosted my website on Firebase also but still same problem any idea ? Or how to allow this api call from my localhost because i am using few microsoft sharepoint api's which i can't request Microsoft for modification.
Pls help.

You can start flutter web server on random port using command flutter run -d web-server, and then go to localhost:port in your browser or you could use release app using following guide https://flutter.dev/docs/deployment/web

@MOlechowski Thanks for your response but its giving below error:

@krunaldarji In AWS you could whitelist a specific port
So I am sure Sharepoint has the same feature
By the way, you can Add the whitelisted port for every run in the launch.json file
"configurations":
[{"name": "Flutter",
"request": "launch",
"type": "dart",
"args": ["--web-port","8080"]
}]

Sharepoint CORS https://techcommunity.microsoft.com/t5/SharePoint-Developer/SharePoint-Office-365-CORS-issue-REST-API-call-to-other/m-p/777557

Hi team
I am facing this CORS policy issue from last 2 month, still not able to figure it out how to fix
Access to XMLHttpRequest at 'http://obuat-env.zuriwydraq.ap-south-1.elasticbeanstalk.com/api/v1/RegisterDevice' from origin 'http://<IP_ADDRESS>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

I have hosted my flutter web app on AWS - Apache environment

please if you any solution please help me.

The solution: create a batch file (or whatever your platform calls the shell scripts) that calls Chrome with the appropriate command line:
"c:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="a-temp-location" %*

Set up an environment variable named CHROME_EXECUTABLE to point to this file. Flutter will then use this file to start Chrome.

@deakjahn
How flutter will use it? is it automatically?

Flutter will then use this file to start Chrome.

Yes. Flutter checks this env variable before it launches Chrome. You can actually check this is you happen to try to start flutter run -d chrome on a system that doesn't have Chrome installed. Flutter will specifically ask you to either put it into the default location or to tell it where it is using CHROME_EXECUTABLE.

@deakjahn your script solution workes like a charm 👍

@deakjahn Thanks! I have adapted your script solution in Linux as described below and it works perfectly!
Create a google-chrome-unsafe.sh with the following content:
#!/bin/sh
/usr/bin/google-chrome-stable --disable-web-security --user-data-dir="A-TEMP-LOCATION" $*

It's better to create and use a dedicated folder in the home directory instead of /tmp for the temporary location, as Chrome will create some folders there to work properly.
Then, make it executable with chmod a+x google-chrome-unsafe.sh
The environment variable can be set in ~/.bashrc or ~/.bash_aliases (if included from .bashrc):
export CHROME_EXECUTABLE=/path/to/google-chrome-unsafe.sh

Yes. Flutter checks this env variable before it launches Chrome. If you try to start flutter run -d chrome on a system that doesn't have Chrome installed, Flutter will specifically ask you to either put it into the default location or to tell it where it is using CHROME_EXECUTABLE (this is actually how I learned of its existence :-) ).

Do I set the User or System environment variable to CHROME_EXECUTABLE? I tried both and running my web application with flutter run -d chrome still resulted in a CORS error.

I have it in System but it shouldn't actually matter. The Flutter doctor display shows the value when it sees it, try that first.

So disabling CORS in Chrome on my development machine will fix it, but once deployed release mode in production the user's wont face any CORS issue?

They will, unless you setup your servers properly. This is something you can't skip.

Would it help if we had "flutter -d web-server" accept additional headers, like:
--web-header "Access-Control-Allow-Origin: my-ip-here"

Why is this closed anyway?  Is there some solution I'm missing?
I ended up setting up a reverse proxy script to modify traffic headers (the flutter host/port are hard-coded near the top of the script).
(The script is from somewhere else on the web, but I modified it for py3.x and had to make some other changes to get it working.)
#!/usr/bin/env python

from http.server import BaseHTTPRequestHandler, HTTPServer
import argparse
import os
import random
import sys
import requests

hostname = "<IP_ADDRESS>";
hostport = "8989";

def merge_two_dicts(x, y):
    z = x.copy()   # start with x's keys and values
    z.update(y)    # modifies z with y's keys and values & returns None
    return z

def set_header():
    headers = {
        'Meow': hostname
    }
    return headers

class ProxyHTTPRequestHandler(BaseHTTPRequestHandler):
    protocol_version = 'HTTP/1.0'
    def do_HEAD(self):
        self.do_GET(body=False)

    def do_GET(self, body=True):
        sent = False
        try:

            url = 'http://{}:{}{}'.format(hostname, hostport, self.path)
            req_header = self.parse_headers()

            print(req_header)
            print(url)
            resp = requests.get(url, headers=merge_two_dicts(req_header, set_header()), verify=False)
            sent = True

            self.send_response(resp.status_code)
            self.send_resp_headers(resp)
            if body:
                self.wfile.write(resp.content)
            return
        finally:
            self.finish()
            if not sent:
                self.send_error(404, 'error trying to proxy')

    def do_POST(self, body=True):
        sent = False
        try:
            url = 'http://{}:{}{}'.format(hostname, hostport, self.path)
            content_len = int(self.headers.getheader('content-length', 0))
            post_body = self.rfile.read(content_len)
            req_header = self.parse_headers()

            resp = requests.post(url, data=post_body, headers=merge_two_dicts(req_header, set_header()), verify=False)
            sent = True

            self.send_response(resp.status_code)
            self.send_resp_headers(resp)
            if body:
                self.wfile.write(resp.content)
            return
        finally:
            self.finish()
            if not sent:
                self.send_error(404, 'error trying to proxy')

    def parse_headers(self):
        req_header = {}
        for line in self.headers:
            line_parts = [o.strip() for o in line.split(':', 1)]
            if len(line_parts) == 2:
                req_header[line_parts[0]] = line_parts[1]
        return req_header

    def send_resp_headers(self, resp):
        respheaders = resp.headers
        print('Response Header')
        for key in respheaders:
            if key not in [
                           'Content-Encoding',
                           'Transfer-Encoding',
                           'content-encoding',
                           'transfer-encoding',
                           'content-length',
                           'Content-Length',
                           'x-frame-options',
                           'x-xss-protection',
                           'x-content-type-options',
                           ]:
                print(key, respheaders[key])
                self.send_header(key, respheaders[key])
                # Response Header
                # date Fri, 29 May 2020 18:35:40 GMT
                # x-frame-options SAMEORIGIN
                # content-type text/html
                # x-xss-protection 1; mode=block
                # x-content-type-options nosniff
                # server dart:io with Shelf
        self.send_header('Access-Control-Allow-Origin', '*')
        self.send_header('Content-Length', len(resp.content))
        self.end_headers()

def parse_args(argv=sys.argv[1:]):
    parser = argparse.ArgumentParser(description='Proxy HTTP requests')
    parser.add_argument('--port', dest='port', type=int, default=9000,
                        help='serve HTTP requests on specified port (default: 9000)')
    args = parser.parse_args(argv)
    return args

def main(argv=sys.argv[1:]):
    args = parse_args(argv)
    print('http server is starting on port {}...'.format(args.port))
    server_address = ('<IP_ADDRESS>', args.port)
    httpd = HTTPServer(server_address, ProxyHTTPRequestHandler)
    print('http server is running as reverse proxy')
    httpd.serve_forever()

if __name__ == '__main__':
    main()

The solution I ended up following was to simply use a CORS proxy url and append it to the beginning of my API endpoint URL. You can do something like this:
Future<Album> fetchAlbum() async {
  String proxy = 'https://cors-anywhere.herokuapp.com/';
  final response = await http.get(`${proxy}https://jsonplaceholder.typicode.com/albums/1`);
  if (response.statusCode == 200) {
    return Album.fromJson(jsonDecode(response.body));
  } else {
    throw Exception('Failed to load album');
  }
}

I really wish there was a simple solution to this. It makes developing my Flutter app that interacts with a legacy web-server very difficult. The simplest option would be to give a way of enabling other domains for the debug webserver that AndroidStudio starts, or give me away to enable source-maps in the standalone flutter webserver.
I can proxy through a server, but then data errors result in incomprehensible errors because source maps never load.
OR
I can run directly out of Android Studio which gives me good errors, but then I can't test any network interactions.
The arguments about fooling people into having problems in production is about as valid as saying that debuggers shouldn't be supported because it is not how production works. Making development difficult WILL NOT increase Flutter Web usage.

So basically no viable solution for this?

A very simply batch file and it works. https://github.com/flutter/flutter/issues/46904#issuecomment-629363145 I've been using it since my first Flutter Web day and it's still perfect. :-)

Hello @deakjahn  , This batch will be used on release version ?  If i did understand well no ? Because my problem is calling some webservice from my release version .

No, I thought you meant debugging, this is what the OP talked about. :-)
In release mode, you need correct CORS settings. I don't think Flutter can do anything about this, this is a browser security limitation. No webapp can override the security features of the browser; iof it could, that would make them completely useless.
So there is actually a web service not under your control that doesn't have correct CORS settings? If it is so, how is anybody supposed to use it, quite independent from Flutter?

@deakjahn Thanks! I have adapted your script solution in Linux as described below and it works perfectly!
Create a google-chrome-unsafe.sh with the following content:
#!/bin/sh
/usr/bin/google-chrome-stable --disable-web-security --user-data-dir="A-TEMP-LOCATION" $*

It's better to create and use a dedicated folder in the home directory instead of /tmp for the temporary location, as Chrome will create some folders there to work properly.
Then, make it executable with chmod a+x google-chrome-unsafe.sh
The environment variable can be set in ~/.bashrc or ~/.bash_aliases (if included from .bashrc):
export CHROME_EXECUTABLE=/path/to/google-chrome-unsafe.sh

This solution didn't work for me on macOS.
I made the following script:
#!/bin/sh
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir="a-temp-location" %*

And set the CHROME_EXECUTABLE variable correctly in my .profile.
When I start my Flutter Web app in debug mode it will correctly open the specified browser (as it will even show a warning about the usafe argument), however, Dart won't find it to attach the app and it won't ever start. The debugger will hang indefinitely as it is still building the app.

Did you leave a-temp-location verbatim? :-)

Did you leave a-temp-location verbatim? :-)

YES

A quick Googling seems to suggest that in sh, the variable to include all passed parameters is<EMAIL_ADDRESS>I used $* on Windows but neither that nor your %* might be accepted in sh.

Hi guys, can you help me? I'm on Mac and this bash_profile is not working:
export PATH="$PATH:$HOME/dev/flutter/bin"
export CHROME_EXECUTABLE="~/google-chrome-unsafe"

What is wrong with it and how should I do that? When I run my IDE with this bash profile chrome is not being listed as device, but if I remove the last line it and restart the IDE it is being listed.
Cc: @mateusfccp, @deakjahn

A quick Googling seems to suggest that in sh, the variable to include all passed parameters is<EMAIL_ADDRESS>I used $* on Windows but neither that nor your %* might be accepted in sh.

I tried with all three, but no results. Finally, I simply gave up doing this. This is the reason this issue exists, after all. :)

@mateusfccp can you show me how did you do with the bash_profile?

Thanks everyone I finally got it working on Mac.

Tell Mateus how. :-)

Here it is:
Device: Macbook Pro
OS: macOS Catalina

Add this to .bash_profile:
export CHROME_EXECUTABLE="/Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe"

Create a shell-script file with this one single line:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir="tmp-dir" $*

OBS: the $* is basically to allow Flutter to provide more flags so don't remove it.

@deakjahn I've updated my comment above.

I have followed the presented steps by @pedromassango using .bash executable
In which I had to add the extension to the .bash_profile like this
export CHROME_EXECUTABLE="/Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe.bash"
After that you should source the path of the .bash_profile and google-chrome-unsafe.bash
it will open the unsafe chrome version, so it means you're good to go, if not restart your machine so the changes are applied
In my case when I ran the debug it didn't start, and running flutter doctor -v gives Permission denied
You should run chmod +x  /Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe.bash
In the app directory so it's able to execute the executable
Another scenario that might occur is to have a Permission denied errno = 13 which states you can resolve by running flutter clean, with more detailed view flutter clean -v but might not work as expected so you must delete the shown file manually on the correspondent paths, in my case were .dart_tool and build.
After that you just need to run it and should work, it will rebuild the project and run.

@jonahwilliams Could you reconsider opening the issue as it got a lot of attention?
Thanks

no

how to create the batch file like @deakjahn had mentioned??

Well, how do you normally create files? That way. :-)

@deakjahn So what I did is, I opened Notepad, wrote those lines and saved it as a .bat file. And then in environment variables, I created a new variable called CHROME_EXECUTABLE and set its value as the path to my .bat file. And the request method, when I inspect the network tab has changed to POST instead of OPTION. Am I doing this right? Sorry I'm a complete noob :/

Unless you allow Notepad to save it as a .txt file. Use a proper programmer's text editor, preferably, but until then, rename the file after editing, if necessary.
Unfortunately, I have no idea at all what you mean by the request method and options. This should have nothing to do with something like that. Using this batch file simply means that Chrome is started with an extra option in the command line that makes it not observe the CORS requirement during debug runs. Which is basically a temporary solution because, in the long run, you have to make sure the server is set up to provide the required CORS settings, there's no way out of this requirement. This isn't a Flutter limitation at all, Flutter has nothing to do with it, it's a browser limitation and cannot be circumvented because that would make it dangerous and no browser vendor would ever do that.

SOLUTION IS LISTED FOR WIKIPEDIA CORS ERROR
A api request to wikipedia from flutter web and the error was very simple the "CORS error".
as it happens i did what we all do "Search The Google" and to many result specially associate with flutter, but most important is so many issues are still not closed.
This person tries to understand what these errors are and why it happen. firebase, google storage CORS error better check this out on stackoverflow
wikipedia api CORS error check this out.
at my side what i was missing was  a &origin=* url parametere with value
previous url  with error : https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=$search&format=json
new updated working url : https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=$search&origin=*&format=json

Now that Flutter Web has gone mainstream, this seems to resurface again. So, let's put it straight, with the largest, boldest letters: THIS IS NOT A FLUTTER ISSUE, there is no Flutter solution or workaround and never will be.
If you use a web service, you have to abide by CORS rules. Check out the web service to see how they want you to do it. If it's your own server, set it up properly. Flutter has nothing to do with it. While you might be able to disable CORS as described above for yourself in debug, there's absolutely no way to do it in release for your users. Simply impossible and would be so dangerous no browser vendor would ever allow it.

To keep it simple, it's not Flutter issue.


Fixed NXOSv 9500 148 directory

Fixed NXOSv 9500 148 directory

Just realized that there is a duplicate Directory of NXOSv 95000 128 ports, deleted it.
Also added readme to correct NXOSv 9500 148 ports directory.


Created delegate to make the UITextField use case more convenient

Sorry for all the TODOs, I'll probably work through them in time :-)
Header has ended up in a separate patch, not done a pull request before...

Header below.  Hopefully next time the site won't confuse me :-)
//
//  EmojiBasicDelegate.h
//  CatchAppDemo
//
//  Created by Andrew Thomas on 4/6/16.
//  Copyright © 2016 catchapp. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ISEmojiView.h"
@interface ISEmojiBasicDelegate : NSObject
@property (nonatomic, weak) UITextField* field;
@end
@interface UITextField(Range)
@property(nonatomic, assign) NSRange selectedRange;;
@end
@interface ISEmojiView(Setup)
+(ISEmojiBasicDelegate*)addTo:(UITextField*)field;
@end

Thank you very much for your Pull Request.
See what you mean. I guess it's about trying to add a default implementation for ISEmojiViewDelegate.Including didSelectEmoji, didPressDeleteButton method, But there are some problems, "field" control may be UITextField, there may be UITextView, so for a library, a good design should cover more scenarios, keep it simple and easy to use.
So your Pull Request can not be merged into the main branch, but I will optimize these features and code updates in the coming days, thank you again.  👊🏻

Of course.  I may well have more time to play with this too, but it is a starting point.  It's frustrating of course that UITextField and UITextView have completely different delegates that serve almost exactly the same purpose.  One solution might be to have -(ISEmojiBasicDelegate*)addTo:(id)anything as a dispatch method, then having -(ISEmojiBasicDelegate*)addToField:(UITextField*)field etc.  There are a load of other omissions too - for example it assumes the textfield contains emoji groups of length 2 - which is problematic if the field has a combination of text and emojis.  It also doesn't handle all the delegate methods yet, just the one I happened to need for my project.

Sorry for the late reply, for UITextField and UITextView different, my idea is to use generics, such as using a UIView to receive these two types of instances (field). then use -isKindOfClass: to distinguish the different operations performed.

I think I'd have described UIView as a common superclass rather than
generics.  It's not all that nice, because if you specify type UIView* for
a method signature as an API developer, then the developer using it will
reasonably try and pass in any view they fancy (UISearchView, UIWebView an
HTML form?).  Taking in id at least warns them to be on their guard
And yes, using -isKindOfClass: is implicit in using a dispatch method in
the way I described :-) .  That said, I believe best practice is to use
respondsToSelector (I wouldn't though).
As a rule of thumb, whenever you use -isKindOfClass you should reconsider
you should instead be subclassing.  In your case, you could create a
category for UITextField and UITextView.  You would then call methods like
-didTypeCharacter:(NSString*)emoji on this category and they would do the
right thing.  Although, the more I think about this, the more I think we're
both approaching this the wrong way - we're trying to re-implement cocoa's
keyboard handling - whereas what we really want is some kind of robot
method.
Andrew Thomas
Founder / Developer
TapTile Mobile
TapTile Games Ltd.  (08535731)
www.taptilemobile.com
On 8 April 2016 at 03:22, isaced<EMAIL_ADDRESS>wrote:

Sorry for the late reply, for UITextField and UITextView different, my
idea is to use generics, such as using a UIView to receive these two
types of instances (field). then use -isKindOfClass: to distinguish the
different operations performed.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/isaced/ISEmojiView/pull/2#issuecomment-207179216


Change Windows VM wizard ISO link to show a UTM-controlled website

I have a concern regarding the link from UTM wizard to uupdump . net – it is a third party service that itself is dependent on Microsoft. This creates friction: for example, the latest scripts for creating the ISO currently don't work on macOS:

Windows 11, version 22H2 or later
This build requires using Windows 10, version 2004 or later for the ISO to be properly created. Scripts for other platforms will output a broken ISO.

I suggest that the VM wizard should link to a UTM-controlled website instead, which contains additional information and links to multiple solutions for obtaining a Windows ISO.
The same should be done for all links in the app where the linked website is expected to update frequently. If we link to a UTM-controlled website, this website can be updated independently of the app and show up-to-date information.
Going a step further, the app could add its platform and version as a URL parameter and the website may use this to highlight relevant content.

Related: #4443

@conath can you be more specific what the issue is and what the last version that does work is? I can add a notice on the docs page.


rename the generated index.html

🚀 Feature request
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Description
I want to rename the index.html after the build,just like html-webpack-plugin filename option.
is there any way to  set it 🤔
Describe the solution you'd like
 If you have a solution in mind, please describe it.
Describe alternatives you've considered
 Have you considered any alternative solutions or workarounds?

You can use the index option in the browser builder
"index": {
  "input": "src/index-prod.html",
  "output": "index.html"
}


Show the date of last update of projects instead of creation date

The projects are sorted based on the last update, which makes it better to show that information instead/along the creation date.


Intensifies the fire of the engine at heat 4 and optimized PNGs

Engines at heat 4 have a fully animated fire.
Optimized heated engine PNG images using lossless compression.

Looks good 👍


Float should be split into smaller traits

Right now Float trait contains methods min_value, max_value, floor, ceil, round, trunc, fract, abs and signum that are also applicable to fixed point numbers. Separating these methods into one or more traits would allow implementing those sub-traits for fixed crate numbers, which implements fixed-point numbers.

On a related note, I was implementing some num-traits in a branch of the fixed crate in order to fulfill a feature request. I was going to implement Signed and Unsigned when appropriate, but they both depend on Num which requires a from_str_radix method. Now in the fixed crate, parsing of the useful radix values 2, 8, 10 and 16 is implemented, but not others, so I could not implement Signed or Unsigned. (Radix values 2, 8, 16 are easy to parse, and 10 has a factor of 2 which makes it easier than other radix values as it puts a limit on the number of fractional digits that might need to be parsed.)

We have Float, then Real drops a few methods related to NaN/infinity, and FloatCore drops mostly transcendental methods that need external support (libm). Maybe we could also add RealCore as a subset of FloatCore, but I'm loath to break this up too much. We can't be everything to everyone.
I also don't want to make any breaking changes here. These traits are used in the public API of a lot of crates, so it would be very disruptive to bump semver. We're effectively stable, despite the pre-1.0 version.

We're effectively stable, despite the pre-1.0 version.

On that note, maybe I should go ahead and release 1.0 and use the semver trick to have 0.2.x re-export that, so they remain compatible. (Same as I did for 0.1 to 0.2.) If someday we do decide to redesign things, there's always 2.0 and beyond...

I do think that splitting Float into more granular pieces important. For example, crate euclid implements its own versions of Ceil, Floor, Round and even One and Zero traits, because Float is "too fat" and One/Zero in num_traits for some reason requires Add. Some notes from euclid code:
// Euclid has its own Zero and One traits instead of of using the num_traits equivalents.
// Unfortunately, num_traits::Zero requires Add, which opens a bag of sad things:
//  - Most importantly, for Point2D to implement Zero it would need to implement Add<Self> which we
//    don't want (we allow "Point + Vector" and "Vector + Vector" semantics and purposefully disallow
//    "Point + Point".
//  - Some operations that require, say, One and Div (for example Scale::inv) currently return a
//    type parameterized over T::Output which is ambiguous with num_traits::One because it inherits
//    Mul which also has an Output associated type. To fix it need to complicate type signatures
//    by using <T as Trait>::Output which makes the code and documentation harder to read.

num_traits is the closest we have to stdlib, but for numeric traits. As a result I feel like it would be the perfect place to provide a set of common traits for other crates to use to enable interoperability.

While it's a little sad that euclid had to go its own way, it's not the end of the world.

num_traits is the closest we have to stdlib, but for numeric traits. As a result I feel like it would be the perfect place to provide a set of common traits for other crates to use to enable interoperability.

In case you're not aware, that de facto status is actually pretty direct. The num crate was initially born from standard library code, and those contents removed from std during the stabilization phase before Rust 1.0. Later we split into the current sub-crates, and kept compatibility by having num re-export the same items. Ultimately, num's broad pseudo-standard usage is exactly why I don't want to risk a schism with new semver releases. I've done so for some of the type crates, like num-bigint, but traits are riskier.

So let's keep this issue on track, without breaking the current traits. Would a new RealCore subset of Real be useful to you? That would include all the methods you mentioned, basically FloatCore without NaN/infinity methods. We can make this implemented for all current T: FloatCore, just as we do on Real for T: Float.

I think the following traits should exist in num_trait in some shape or form:

Fractional part manipulation: floor, ceil, round, trunc, fract
Bounded: min_value, max_value - already exists
Min-max: min, max
Sign manipulation: abs, signum
Trigonometry functions: sin, cos, etc
Finite/infinite numbers: is_nan, is_finite
Powers and logarithms: powi, powf, sqrt, expr

I'm mostly interested in the first 3 (1 of which already exists).

I vote for more flexible structure for float traits.  I understand that compatibility is important, but maybe the earlier we make these change, the less burden we will have in future. I think at least the float traits should be divided so that bigfloat types and simd types can implement some of them easily.


TF 1.11.0 Updating non-Variables?

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
Yes https://gist.github.com/dvisztempacct/43e738e1651ecf61323ae92cae41c94c
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Ubuntu Bionic Derivative (System76 PopOS)
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
n/a
TensorFlow installed from (source or binary):

pip3 install tensorflow==1.11.0

TensorFlow version (use command below):

$ python3 -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
v1.11.0-0-gc19e29306c 1.11.0

Python version:

$ python3 --version
Python 3.6.7

Bazel version (if compiling from source):
n/a
GCC/Compiler version (if compiling from source):
n/a
CUDA/cuDNN version:

$ dpkg -l | grep -iE 'cuda|cudnn'
ii  cuda-repo-ubuntu1604                             9.0.176-1                           amd64        cuda repository configuration files
ii  system76-cuda                                    0pop2                               amd64        NVIDIA CUDA Compiler / Libraries / Toolkit Metapackage
ii  system76-cuda-9.0                                0pop3                               amd64        NVIDIA CUDA 9.0 Compiler / Libraries / Toolkit
ii  system76-cuda-9.2                                0pop3                               amd64        NVIDIA CUDA 9.2 Compiler / Libraries / Toolkit
ii  system76-cudnn-9.0                               7.1.4~0pop1                         amd64        NVIDIA CUDA Deep Neural Network library (cuDNN) for CUDA 9.0

GPU model and memory:

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
01:00.0 VGA compatible controller: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] (rev a1)
$ nvidia-smi
Sun Feb  3 20:54:44 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.78       Driver Version: 410.78       CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 107...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   52C    P5    16W /  N/A |    682MiB /  8119MiB |     29%      Default |
+-------------------------------+----------------------+----------------------+

You can collect some of this information using our environment capture script
You can also obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the current behavior
Non-variables seem to be being updated.
Describe the expected behavior
Non-variables should be initialized when running tf.global_variables_initializer and otherwise not updated.
Code to reproduce the issue
https://gist.github.com/dvisztempacct/43e738e1651ecf61323ae92cae41c94c
Other info / logs

I may simply be misunderstanding how tf.random_normal is supposed to work, but I had thought if I didn't initialize a tf.Variable using the tensor returned by tf.random_normal (as I do on line 12) that it would only be initialized by tf.global_variables_initializer or similar, and wouldn't be updated or reinitialized upon subsequent runs unless I included such an initializer.
Thanks!

Hi @alex-petrenko I did try tf.constant:
import tensorflow as tf
foo = tf.random_normal(
    shape=[],
    mean=0.0,
    stddev=1.0,
    name='train_x'
)
train_x = tf.constant(foo, shape=foo.shape)

The output:
Traceback (most recent call last):
  File "bug.py", line 8, in <module>
    train_x = tf.constant(foo, shape=foo.shape)
  File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 207, in constant
    value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 442, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 350, in _AssertCompatible
    raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected

The only thing that did work for me was a tf.Variable with trainable=False. Which leads me to wonder: what is the difference between a tf.constant and tf.Variable with trainable=False?
Thanks!

tf.constant takes a numpy array as an argument, not a tensor
On Tue, Feb 5, 2019 at 10:25 AM Don Viszneki<EMAIL_ADDRESS>wrote:

Hi @alex-petrenko https://github.com/alex-petrenko I did try tf.constant
:
import tensorflow as tf
foo = tf.random_normal(
shape=[],
mean=0.0,
stddev=1.0,
name='train_x'
)
train_x = tf.constant(foo, shape=foo.shape)
The output:
Traceback (most recent call last):
File "bug.py", line 8, in
train_x = tf.constant(foo, shape=foo.shape)
File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 207, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 442, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/home/hdon/.local/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 350, in _AssertCompatible
raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected
The only thing that did work for me was a tf.Variable with trainable=False.
Which leads me to wonder: what is the difference between a tf.constant
and tf.Variable with trainable=False?
Thanks!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/25478#issuecomment-460746426,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAATxfJn3T_RL7PGXi51IFyEyaTXWkwhks5vKcx7gaJpZM4agjd4
.

--

Alex


How to show just a specific month?

Hi there,
I was thinking about if there was a way to just show a specific month rather than a whole year, regarding the use case of tracking habits monthly.
My attempt was below

dv.span("**👟 Gym ** First Phase")

const calendarData = {
 year: 2023,
    month: 8,
    colors: {
        white: ["#ba3030", "#c72c2c", "#ce2525", "#d62121", "#df1b1b"],
    },
    entries: []
}

for(let page of dv.pages('"--Daily Briefing--"').where(p=>p.gym)){

    calendarData.entries.push({
        date: page.file.name,
        intensity: 4,
        content: "👟"
    })
}

//console.log(calendarData)

renderHeatmapCalendar(this.container, calendarData)

I added a key month with the value 8 or August but I knew it didn't work after reviewing the code in main.ts ;
If I wanted to develop this feature, what's the best way to do that? can you guide me a bit so I can learn and develop the specific feature for this plug in?
Best,
David

Maybe you've found out by yourself, but you could simply change the filter so that the heatmap is based on pages where gym is present and the month is August.
Since you're using page.file.name as the date, I'm assuming that your filenames are dates, which means every page object will have the day field available (see the docs). That field is a Luxon DateTime object.
Change where(p=>p.gym) into where(p=>p.gym && p.file.day.month == 8) and you should get what you want.

@tatablack that is still going to render the entire year

Closing as duplicate of https://github.com/Richardsl/heatmap-calendar-obsidian/issues/7


Slow gif

Please help. Some gifs are playing really slow. I'm getting the duration of the gif, and most gifs have 1s, and a few have 9s~10s.
But if I check the duration of the gif manually, with an .exe i have in my Windows computer, it says the gifs have around 1s~2s.
Does anyone knows what is causing this?
Btw, i'm using the latest swift version.

What shoul i do to slow the move of GIF


⚠ Secret Website 1 has degraded performance

In 4a7c4f7, Secret Website 1 ($SECRET_WEBSITE_1) experienced degraded performance:

HTTP code: 200
Response time: 7455 ms

Resolved: Secret Website 1 performance has improved in 79568fc.


Sending a single Push creates multiple calls on server

I've managed to send a Push Notifications with the parse-server. I did it testing from a curl and from a custom function that I made. The push arrives correctly to the device (iPhone), but the thing is that if I do a heroku logs -t, looks like it tries like a million times to send the push.
This is the curl:
curl -X POST -H "X-Parse-Application-Id: myAppId" -H "X-Parse-Master-Key: myMasterKey" -H "Content-Type: application/json" -d '{ "where": { "deviceType": { "$in": [ "ios" ] } }, "data": { "title": "Push Test", "alert": "Push text!" } }' https://myApp.herokuapp.com/parse/push
And this is part of the heroku logs -t output:
APNS can not find vaild connection for {"type":"Buffer","data":[141,96,134,253,21,125,236,237,41,234,101,239,35,114,182,175,225,46,234,42,130,40,96,39,33,2,25,1,96,53,87,86]}
APNS Connection 0 Disconnected
APNS Connection 0 Connected
That keeps coming out over and over again among other things, but it's always printing the same output. It's normal?

How many records do you have in the _Installation class?

Hi @alariju, most of time this means some of your installations' deviceToken is not valid. As we mentioned in wiki, we do not have error handling yet. If your device can receive the notification in the end, you can ignore it right now, we will add the error handling later.

Thanks for the replies.
@gfosco I had multiple records on _Installation class. I guess the server was iterating over all records (I migrated the _Installation class from Parse to a mongolab database.), so thats the reason all the errors were coming out in console.
@wangmengyan95 Ok, I'll be waiting for that error handling.


Torchserve security update

What this PR does / why we need it:
Security issue in Torchserve require new arguments to be added when torchserve starts in order to maintain the same functionality as before. Users should look to https://github.com/pytorch/serve for full explanation of the security update.

I think we need to bump up the tochserve version here

Cc @andyi2it to review

/hold

These args are compatible with torchserve 0.9, however they could be redundant in version 0.9 as that is the default in 0.9. However, 0.11.x changes the behavior and hence may be required. https://github.com/pytorch/serve/releases/tag/v0.11.1
/lgtm

@andyi2it seems like this only updates the doc, but we should really update the torch serve runtime yaml with these arguments right?

These args are compatible with torchserve 0.9, however they could be redundant in version 0.9 as that is the default in 0.9. However, 0.11.x changes the behavior and hence may be required. https://github.com/pytorch/serve/releases/tag/v0.11.1
/lgtm

@andyi2it seems like this only updates the doc, but we should really update the torch serve runtime yaml with these arguments right?

Discussed with @andyi2it we can add in torch serve 0.11


Replace casadi links

Description
Fixes the lychee CI check. I replaced the tiny-urls with the integrator and root finder links in the current documentation.
Type of change
Only documentation.

[x] Bug fix (non-breaking change which fixes an issue)

Key checklist:

[x] No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
[x] All tests pass: $ python run-tests.py --all (or $ nox -s tests)
[x] The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).
Further checks:

[x] Code is commented, particularly in hard-to-understand areas
[x] Tests added that prove fix is effective or that feature works

The failing tests seem to be an install issue.

The failing tests seem to be an install issue.

Yes, it's coming from CMake's new release. Let me file an issue on their tracker about it


Fix shared memory size of "command_buffer"

If I'm not mistaken, Server->Malloc() takes the buffer size in bytes, not bits. So the whole constant UCommandCenter::BYTE_SIZE is not needed (or at the least, the constant should be equal to 1, not 8).
From what I see on my machine, the engine currently allocates 8 times too much memory for "command_buffer", when compared to the client. (engine: 8388608 vs. client: 1048576). This changes fixes that.

 Could you merge your branch with the develop branch? We push changes to develop since master is our release branch. Thanks!

 Could you merge your branch with the develop branch? We push changes to develop since master is our release branch. Thanks!

Done.
(At least I think so... Let me know if anything is wrong. I did this whole pull request from the browser without cloning the repo)

Done.
(At least I think so... Let me know if anything is wrong. I did this whole pull request from the browser without cloning the repo)

Good catch on merging develop. We should be good to test this now.

Good catch on merging develop. We should be good to test this now.


fix: improve git commit message via nvr

I love the nvr implementation with LazyGit and this plugin to write my commit messages from within Neovim without spawning a new instance. But one thing that has bugged me all the time is that whenever I leave the "commit message window" to check for words, information or whatever it tries to reopen the LazyGit window (which sometimes did not work and left me with an open and empty floating window) and I have to close it again manuallly
I saw in #12 that you got a "cannot delete buffer" error when trying to use a different autocommand event for it
After playing around with it myself and reading some documentation I (think I) found the root cause for this and a working solution:
The issue
When we close the git commit message buffer the BufUnload autocommand is triggered and the LazyGit command is called. This tries to open the floating window for lazygit internally. When opening a floating window with nvim_open_win(border_buffer, true, border_opts) Neovim tries to open the floating window (which at this point contains the current git commit message buffer) and then switch to the buffer provided by the nvim_open_win function. I am not 100% sure about the internals, but my guess is that the problem here is that this references a buffer which is about to be deleted and that this clashes the whole process :thinking: (if somebody can explain this with more details, I would like read it)
I think this is related to the description here but I am not completely sure :sweat_smile:
The solution
To mitigate this problem we defer the call of the LazyGit command after the deletion has been completed and it is save to call it using vim.schedule. Since it could happen that after unloading the commit message buffer we enter a buffer which is not related to the former git project this would then open LazyGit with the wrong project root (or even fail if not inside a git project). To be sure it opens correctly I save the current project root and call LazyGit with this afterwards.
I am currently using this modification in my daily work without any issues so far, but I am open for any ideas or changes :slightly_smiling_face:

Thanks for experimenting with this and submitting a PR! I'll merge it and play around with it too.


Trackpoint speed cant be seperatly adjusted

I have set up m trackpad to a perfect speed, but trackpoint is tied to trackpad speed and it feels slow and unusable at that speed
Can you suggest how to tweak it? Havent found anything on the internet about that tho

doubtful this can be possible thru macOS (you will have to tweak the EFI) macOS only supports one trackpad but because of virtualisation, we can add many more like touchscreens and trackpoints. just test this out but, try changing the track settings in the mouse section instead of the trackpad section. If that doesn't work well... yeah...

@zeeall did you try it out yet?

@Mifaxav this did work, but its still not that fast as i want it to be and the mouse will be lightning fast too... idk i just need to understand how to manually change only trackpoint speed in config.plist or kext or smth

Tbh I don't have that much of an idea. Try contacting valnoxy if possible
or check out any video regarding the same
On Fri, 1 Jul, 2022, 7:17 pm zeeall, @.***> wrote:

@Mifaxav https://github.com/Mifaxav this did work, but its still not
that fast as i want it to be and the mouse will be lightning fast too...
idk i just need to understand how to manually change only trackpoint speed
in config.plist or kext or smth
—
Reply to this email directly, view it on GitHub
https://github.com/valnoxy/t480-oc/issues/17#issuecomment-1172368448,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUD6MXZN762RGZ7HBJXY4BTVR3ZHFANCNFSM5Z5RKTBQ
.
You are receiving this because you were mentioned.Message ID:
@.***>


search attributes functionality is unclear

In the persistence workflow, what i'm seeing is search attribute set and get operation has the same purpose as GetDataObject.
What capability does this search attribute has other than storing some data and getting some data across workflow state?

In the persistence workflow, what i'm seeing is search attribute set and get operation has the same purpose as GetDataObject. What capability does this search attribute has other than storing some data and getting some data across workflow state?

It allows you to search -- finding the workflow by a SQL like query.
E.g. you have SA FirstName. And there are millions of worklfow executions. You want to find a workflow execution that has FirstName="John" you can find it using the query.

https://github.com/indeedeng/iwf/wiki/Persistence I have very little doc here. Sorry haven't got enough time to document all the behavior. I will start working on the documentation soon in the new year! @dennissetiawan


Emoji in footer is not rendering

Describe the bug
The emoji is not rendering in the footer
How to Reproduce
In the footer, the ❤ emoji is not rendering. Though I don't know if it is meant to be.

Screenshots

Expected behavior
I think something like this should render
Made with ❤ by AsyncApi Initiative

your are right, we should have ❤ there

@Souvikns Should we close this one?

Yeah


Adding file

Hello World

Step 7: Respond to a review
Your pull request is looking great!
Let’s add some content to your file. Replace line 5 of your file with a quotation or meme and witty caption. Remember: Markdown is supported.
⌨ Activity: Change your file

Click the Files Changed tab in this pull request
Edit your newly added file
Replace line 5 with something new
Scroll to the bottom and click Commit Changes

Note : Can't find the button to edit the file? It may look like a pencil, or it may look like three dots.
I'll respond when I detect a commit on this branch.

Step 7: Respond to a review
Your pull request is looking great!
Let’s add some content to your file. Replace line 5 of your file with a quotation or meme and witty caption. Remember: Markdown is supported.
⌨ Activity: Change your file

Click the Files Changed tab in this pull request
Edit your newly added file
Replace line 5 with something new
Scroll to the bottom and click Commit Changes

Note : Can't find the button to edit the file? It may look like a pencil, or it may look like three dots.
I'll respond when I detect a commit on this branch.

Not able to commit to this branch "edit file" is not working


statestore-checker does not work for DatasetState

The gobblin statestore-checker fails to read the statestore jst files for jobs that use datasetUrn (JobState.DatasetSet).
FsDatasetStateStore.getAll(String storeName, String tableName) looks for current.jst file under the statestore/jobName directory. For jobs that use DatasetState, there are multiple current jst files. One for each dataset in the format dataset-urn-current.jst.
We need to read all the *-currnet.jst files and pass it to the json wirter.
Also update the wiki if needed https://github.com/linkedin/gobblin/blob/master/gobblin-docs/user-guide/Troubleshooting.md

Fixed with https://github.com/linkedin/gobblin/pull/1323
Thanks @agepati