ACL Support

Hey !
I'm very interested in your project, I myself did an implementation of graphql inside loopback about 6 month ago on loopback 2.0 version. I've had troubles dealing with ACLs. I know it's in your roadmap, but do you have any ideas on how to implement them inside loopback-graphql ?
This project looks very promising !

I am looking into it. The one approach that might work is using strong remoting to access the data, hence ACL will work.
WDYT?

Yup that's the one approach I was looking into earlier this week but was lacking time to test it correctly and ended up using something like this :
function checkACL({accessToken, id, model, method}) {
  return new Promise((resolve, reject) => {
    ACL.checkAccessForContext({
      accessToken,
      model,
      property: method,
      method, method,
      modelId: id,
    }, (err, res) => {
      if (err)
        reject(err);
      else if (res.permission !== ACL.DENY)
        resolve(res);
      else
        reject('Authorization Required');
    });
  });

One resolver amongst others :
return checkACL({accessToken: req.accessToken, model: 'map', method: '__get__markers', id: map.id})
      .then(() => app.models.map.findById(map.id))
      .then(map => map.markers.getAsync());

This was for a prototype project, it works but not the best solution at all since this logic is one layer too high. It should be in the logic layer not the graphql resolver.

Any update on this? This project looks amazing but I don't think I would be able to use it without ACL support :/ Happy to help out if required :)

Feel free to suggest a PR
On Thu, Apr 6, 2017, 16:12 Tim Perry<EMAIL_ADDRESS>wrote:

Any update on this? This project looks amazing but I don't think I would
be able to use it without ACL support :/ Happy to help out if required :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Tallyb/loopback-graphql/issues/34#issuecomment-292169896,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHC0jyze5ixmsw_3YajDkrsneU5-7Irpks5rtOTXgaJpZM4L--G9
.

Hi there!
I was working on implementing ACLs in loopback-graphql the last two days. Finally I almost have a working thing. Probably is not the best solution, but @LancelotP give me the idea. Please, let me know what do you think.
I'm working only with findOne execution by the moment. I wrote this checkACL function for testing:
function checkACL(params, modelObject) {
  const AccessToken = modelObject.app.models.AccessToken;

  const ACL = modelObject.app.models.ACL;
  return new Promise((resolve, reject) => {
    AccessToken.resolve(params.accessToken, (err, res) => {
      const at = res;
      if (!at) {
        resolve(false);
      } else {
        ACL.checkAccessForToken(at, params.model,  params.modelId, params.method, (err2, res2) => {
          console.log("ACL: ", res2);
          if (err2) {
            reject(err2);
          } else if (res2) {
            resolve(modelObject.findById(params.modelId));
          } else {
            reject();
          }
        });
      }
    });
  });

This function resolves a promise with the result of findById if the token is allowed and rejects with an error or null when not allowed or in case of error.
Then I've modified the findOne function:
function findOne(model, obj, args, context) {
  const accessToken = context.query.access_token;

  let id = obj ? obj[model.getIdName()] : args.id;

  return checkACL({
    accessToken: accessToken,
    model: model.definition.name,
    modelId: id,
    method: 'title',
  }, model);

}

As you can see I'm getting the access token from the request, then I return the checkACL promise. checkACL can validate if a token is allowed to access the resource. The fact is when the token is allowed the query is executed correctly.
HTTP Status: 200
{
  "data": {
    "Book": {
      "title": "Libro 1"
    }
  }
}

But, in the case that the token is not allowed, proper response would be a 403 forbidden. Now I just get this:
HTTP Status: 200
{
  "data": {
    "Book": null
  },
  "errors": [
    {
      "message": "Cannot return null for non-nullable field Book.title.",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ],
      "path": [
        "Book",
        "title"
      ]
    }
  ]
}

I don't have any idea on how to change the statusCode from loopback-graphql. DOn't know even if it's possible.
Do you have any idea on how to manage this?
Thank you in advance.

I am looking into another (simpler) solution. Possibly calling the REST APIs which will automatically implement the ACL

I already tried that @Tallyb ;)
Same results. The REST promise rejects and the result of the findOne
Promise does not complain with what is expected, so that's not the
solution, unless I implemented it wrong (thing that is perfectly possible :)
I'm dressing my code now. I will make a fork or monday with my progress.
El vie., 21 jul. 2017 a las 10:51, Tally Barak<EMAIL_ADDRESS>escribió:

I am looking into another (simpler) solution. Possibly calling the REST
APIs which will automatically implement the ACL
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Tallyb/loopback-graphql/issues/34#issuecomment-316944628,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtJ-8BPTitom5WKWGJ0ZCS2PKvDnXnCks5sQGajgaJpZM4L--G9
.

I mean does not fit :D
El vie., 21 jul. 2017 a las 11:00, Miguel Angel Flores (<
<EMAIL_ADDRESS>escribió:

I already tried that @Tallyb ;)
Same results. The REST promise rejects and the result of the findOne
Promise does not complain with what is expected, so that's not the
solution, unless I implemented it wrong (thing that is perfectly possible :)
I'm dressing my code now. I will make a fork or monday with my progress.
El vie., 21 jul. 2017 a las 10:51, Tally Barak<EMAIL_ADDRESS>escribió:

I am looking into another (simpler) solution. Possibly calling the REST
APIs which will automatically implement the ACL
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Tallyb/loopback-graphql/issues/34#issuecomment-316944628,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABtJ-8BPTitom5WKWGJ0ZCS2PKvDnXnCks5sQGajgaJpZM4L--G9
.

It's almost working, but I have a strange behavior checking permissions. I just opened a Issue in loopback:
https://github.com/strongloop/loopback/issues/3518


fix(sec): upgrade org.eclipse.jetty:jetty-server to 12.0.0.beta0

What happened？
There are 1 security vulnerabilities found in org.eclipse.jetty:jetty-server 9.4.48.v20220622

CVE-2023-26049

What did I do？
Upgrade org.eclipse.jetty:jetty-server from 9.4.48.v20220622 to 12.0.0.beta0 for vulnerability fix
What did you expect to happen？
Ideally, no insecure libs should be used.
The specification of the pull request
PR Specification from OSCS

This appears to bump us to the wrong version 12.0.0.beta0(instead of 9.4.51) and it does not look like the issue at hand affects OpenRefine?


fail installing plugin

Sorry, wrong plugin

What's wrong ? 🤔
Please report about it. 🙏

))
I am wrong i18n plugin with i18next. Sorry 🙏
Close, please


Bug in toolkit -- missing timeout

Hello,
Looking at the code in toolkit.py, I see that the timeout argument is not passed down to the self.client.run_task in Line 33. Can you please look into fixing this?
Thank you!

Hello! Thanks for reporting! We somehow overlooked it. I would really appreciate if you could open a PR fixing this. Otherwise either me or @aleh-null will fix this later today.

Hello, created #30 to fix this. Let me know if that's fine.

@prabhuteja12 Thank you! It's perfect and I merged it. Congrats on your first contribution! The new sdk version (0.5.2) should be available in PyPi now.


Can you add this source pls

This is a Hindi dubbed anime provider can you pls add it 🥺
https://animedekho.com/

No.. I cannot even open the web...


remove note about mobile, fix links

Docs Build status updates of commit d199672:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/concepts/authentication/auth-oauth-card.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


gitignore is set to ignore these message files

Source: https://github.com/auviitkgp/kraken_3.0/blob/indigo-devel/.gitignore#L7
**/msg/*Action.msg
**/msg/*ActionFeedback.msg
**/msg/*ActionGoal.msg
**/msg/*ActionResult.msg
**/msg/*Feedback.msg
**/msg/*Goal.msg
**/msg/*Result.msg
**/msg/_*.py

We found this problem when @aniket11bh tried to add a message file called controllerResult.msg inside kraken_msgs/msg/ folder.
@nevinvalsaraj :

Why had you added these lines?
Don't we think we should make them more specific?

cc @prudhvid @auviitkgp/developers

@icyflame this was done because when we write an action file for ActionLibServer, it generates the following messages http://wiki.ros.org/actionlib (check 5.3). So, I advised to add the following lines to gitignore to @nevinvalsaraj . So please ask aniket to change the name of message and put up a PR again

As a matter of fact, we added the file using git add filename -f which
force adds a file. That's fine for most cases, but having a related file
name is important. I will look into making the line more specific (as in
something else rather than just **/msg/*.msg which is equivalent to any
.msg file inside the msg folder of any sub-directory.


Enabling A/B testing

It would be helpful to have different versions of the site live so we could make more data-driven decisions regarding the changes that we introduce to the the client.

A/B testing could be useful but it might be good to specify a few things if this were to be implemented.

What sort of elements would we change? (See below)
Whose responsibility is it to view the analytics and coordinate changes on which experiment to use?

Users will most likely be on content related pages like the curriculum and the news routes. My assumption is that users would stay on the site longer if the content is good, rather than some visual of the site, but I could be wrong.
This blog post appears to be helpful in actual implementation of this using https://www.npmjs.com/package/@marvelapp/react-ab-test.
Good news is that it appears that @marvelapp/react-ab-test is maintained as of last December, which is good because it is a fork of what appears to be an unmaintained react-ab-test from 2017.
It appears that this is all that might be needed to implement an experiment.
<Experiment name="My Example">
    <Variant name="A">

Version A

    </Variant>
    <Variant name="B">

Version B

    </Variant>
</Experiment>

We are mainly interested in improving time on site, sign-ups, donations, etc.
That would require split testing the followings:

challenge UI, map UI, ...
donation modal UI, interval, and copy, ...
landing page, sign up button placement, ...

I will take on the testing for the time being.


Solaris 2.6 @ SPARC and Internet Explorers

Just some screens. Thank you for very cool project!
Internet Explorer 4.0:

Internet Explorer 5.0:

Thank you for the great images, really interesting setup and nice to see it working!


Unify example documentation with the examples README(s)

Generate example docs from READMEs in the examples folder to reduce duplicate effort. Keeping the full examples documentation together with the code will also make it easier for users find the examples from the repository rather than the website.
We need a way to separate high level descriptions about the examples (that can be used on a summary page) from setup instructions etc that might me necessary for the particular example.
Should be done after #2134
If this requires / becomes much easier if examples is given it's own top level url like rerun.io/examples, we should do that.

I'd expect the resulting structure on the docs site to mirror the repository structure, which I think should be:
examples/
    README.md
    python/
        README.md
        real_data/
            README.md
            example1/
            example2/
            ...
        toy_data/
            README.md
            ...
    rust/
        README.md
        real_data/
            README.md
            ...
        toy_data/
            README.md
            ...


Upgrade timezone dependency from 0.8.0 to 0.9.0

I noticed that timezone 0.9.0 published 2 months ago, I'm using another plugin named: flutter_local_notifications which also use timezone, currently I need use dependency_overrides to force timezone 0.9.0.

already in the pipeline. See #459


Hangs when pasting from clipboard

System

Operating System
Linux

Display Server
X11

Window Manager
i3

Compositor
compton

Summary
When attempting to paste from the clipboard, Alacritty hangs for a few seconds (multiplied by the number of times Ctrl+Shift+v is pressed). I searched and found a few other clipboard issues but they all seem to affect Wayland rather than X11.
This has only been an issue since updating Alacritty from 0.3.2 to 0.3.3.
Behavior
If I use Nextshot to take a screenshot then paste the URL into Alacritty, it hangs before oh-my-zsh finally spits out a bracketed-paste-magic:zle:47: not enough arguments for -U error and nothing is pasted. If I paste the URL into Firefox, then copy from the address bar back into Alacritty, it works as expected.
Expectation
Link should be pasted into the terminal without hanging
Extra
While OMZ spits out an error, plain zsh (with zsh -f) and bash hang with no error.
If I run Alacritty with -vv, when it hangs I get:
Unable to load text from clipboard: Selection timed out

This seems to only affect clipboard contents that has a mime type (or specific target?)  set:

As an aside, pasting images from Firefox still displays the bracketed-paste-magic error from OMZ, but does not hang. If an image is pasted after being copied with -t image/png, it hangs and errors the same as text.

How do other terminal emulators behave when trying to paste into them?

Termite works as expected, as does Alacritty if I downgrade back to 0.3.2. It got a bit confusing with multiple terms, versions, flags and content types so I've put it all in tables.
Alacritty 0.3.2

xclip flags
Content
Behaviour

None
Text
Works

-t text/plain
Text
Works

None
Image
No hang - Error: target STRING not available in shell

-t image/png
Image
No hang - Red Alacritty Error (screenshot below)

Alacritty 0.3.3

xclip flags
Content
Behaviour

None
Text
Works

-t text/plain
Text
Hangs then bracketed-paste-magic error*

None
Image
No hang, but still gets bracket-paste-magic error*

-t image/png
Image
Hangs then bracketed-paste-magic error*

* bracketed-paste-magic:zle:47: not enough arguments for -U happens only in Oh My ZSH.
Bash (and ZSH with -f) do not display the error, but otherwise behaviour there is the same.

Termite

xclip flags
Content
Behaviour

None
Text
Works

-t text/plain
Text
Works

None
Image
No hang - fails silently

-t image/png
Image
No hang - fails silently

Alacritty error in 0.3.2 (somewhat expected given it's an image):

I've reported this upstream in https://github.com/quininer/x11-clipboard/issues/13.

Bump, getting this too.
Started happening after upgrade from 0.3.2 to 0.3.3

Hi, I'm still getting this issue.
I'm on alacritty 0.3.3 (14fa026), zsh 5.7.1 (x86_64-debian-linux-gnu) and using OhMyZSH.
When trying to paste, I get:
bracketed-paste-magic:zle:47: not enough arguments for -U

This didn't happen before a recent update...

Is that in Wayland or X11? That sounds like your zsh config might be a bit odd.

#2574 #2453.

That will be it, I've noticed over the day the issue sometimes going away...

I'm getting it just pasting into terminal from putty.

I have the same issue:
bracketed-paste-magic:zle:47: not enough arguments for -U

Sorry, I've been a bit busy and haven't had the time to test this until now.
I can confirm the hang is fixed by #2603, but text still does not get pasted when xclip's -t, -target option is set to text/plain. Under OMZ the bracketed paste error appears on a new line, while "vanilla" Zsh acts as if no keys were pressed at all. Given the upstream commit that fixed the hang, this seems to be expected behaviour.
That said, when no target is passed to xclip, paste remains working without any hang or error so to workaround it I'll simply not set a target under X11 until upstream has support (or I learn Rust, whichever comes first).

I can run xclip -o -t text/plain without any issues on the latest master. I have xclip 0.13-2 installed on Arch Linux FWIW.

@nixpulvis 	I'm running the same version of xclip as you (also on Arch).
xclip -o -selection clipboard -t text/plain works fine; the issue lies in pasting with ctrl-shift-v after doing echo foo | xclip -selection clipboard -t text/plain.
Middle-click works to paste, but that seems to be pulling from the primary selection rather than clipboard which is what you'd get with the keybinding.

@dshoreman ah, sorry I misunderstood you. I can indeed replicate this.
What's somewhat interesting, is that xclip is adding a ctrl-v binding, which works, but doesn't paste the trailing newline, where as, Termite for example does print the trailing newline when using their paste command. Kitty also seems to have this same bug, FWIW.

Sounds like we're waiting on x11-clipboard/issues/7 to handle this.


feat: app.manifest is being validated now according to the docs

Docs link: https://dev.splunk.com/enterprise/reference/packagingtoolkit/pkgtoolkitappmanifest/#JSON-schema-200
schemaVersion, targetWorkloads and supportedDeployments keys are now being validated.

Codecov Report

Merging #754 (0300c5e) into release/v5.27.0 (4856548) will increase coverage by 0.32%.
The diff coverage is 93.10%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@                 Coverage Diff                 @@
##           release/v5.27.0     #754      +/-   ##
===================================================
+ Coverage            68.97%   69.30%   +0.32%
===================================================
  Files                   41       41
  Lines                 2134     2160      +26
  Branches               404      409       +5
===================================================
+ Hits                  1472     1497      +25
- Misses                 641      642       +1
  Partials                21       21

Impacted Files
Coverage Δ

splunk_add_on_ucc_framework/commands/build.py
13.14% <0.00%> (-0.06%)
:arrow_down:

splunk_add_on_ucc_framework/app_manifest.py
100.00% <100.00%> (ø)


docs: Document printable conversations.

This adds a new page to the documentation for documenting the printing feature. It links to the documentation under the "Streams & topics" section.
This is ready to merge, now that #26374 has been merged.
CZO discussion
Screenshot

Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[x] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[x] Calls out remaining decisions and concerns.
[x] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[x] Visual appearance of the changes.
[x] Responsiveness and internationalization.
[x] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

One thing to tweak in the description is that it's not just conversations that can be printed -- any message feed view, including searches, can be printed.

Thanks so much for the feedback, @drrosa! I've incorporated your suggestions and Tim's as well.
A couple of questions that still occur to me:

Is "Print a conversation" still the right title/URL for this?
Is its place under "Streams & topics" still okay? Or should it be moved to "Reading messages"? Or somewhere else?

Is "Print a conversation" still the right title/URL for this?
Is its place under "Streams & topics" still okay? Or should it be moved to "Reading messages"? Or somewhere else?

Hm, maybe "Printing messages" would be a better title/URL, and we should probably move it to "Reading messages", below "Searching for messages"?
@laurynmm What do you think?

Hm, maybe "Printing messages" would be a better title/URL, and we should probably move it to "Reading messages", below "Searching for messages"?

I agree with both of those thoughts.
My only other question about the current PR content is whether the two paragraphs at the bottom apply to search type views as well or if they only apply to conversation views?

Thanks, Lauryn!
I re-read the two paragraphs at bottom, and those details do apply to search views, too (although I also discovered that the X to close the search box is printing, so I've made a note to fix that in a small separate PR).

This is great, merged, thanks @karlstolley!


Warn on private on_return method

This would have saved me about 20 minutes of confusion this morning.

:+1: This is the sort of thing that makes ProMotion awesome.

:sparkles: :heart: :sparkles:


Enhancement: 2d Pooling

Could put in 2d pooling for an easy to drop in alternative to AvgPool2d by using pixel_unshuffle for cases where there's exact divisions of an input shape, or padding and unfold for overlapping windows / strides that aren't equal to the window size.
I don't know how fast Unfold is or if there's a better way to do the operation; I tried checking the PyTorch github to see how it does AvgPool2d for strides that aren't equal to the window size behind the scenes but I can never seem to figure out which version of the operation is the one that's used, it's defined in so many places it's beyond me.
I've once seen an alternative to pixel unshuffle that used grouped conv2d, a kernel that put each position into its own channel output, and stride, but I can't seem to find it again. It was useful because you could adjust the stride and then it'd be like Unfold, but I never got around to testing if it was actually faster.

@torridgristle sure i'll think about it, perhaps can build it with https://github.com/openai/triton

@torridgristle would you be willing to share some of your experimental results, if i were to make the LogAvgExpPool2d?

@torridgristle https://github.com/lucidrains/logavgexp-torch/tree/0.0.3#logavgexp2d

Thanks a lot @lucidrains, a great implementation. Will 3D variant be implemented as well ?

@ekurtulus :wave: sure, why not https://github.com/lucidrains/logavgexp-torch/commit/250852d83e045f0ff1a13e69b4013e636055cdcc

Thanks a lot : )


Python Cyber Usage

Try run example got errror:
Traceback (most recent call last):
  File "record_parser.py", line 11, in <module>
    from cyber_py import cyber
  File "../cyber_py/cyber.py", line 32, in <module>
    CYBER_PATH = os.environ['CYBER_PATH']
  File "/usr/lib/python3.5/os.py", line 725, in __getitem__
    raise KeyError(key) from None
KeyError: 'CYBER_PATH'

How to set CYBER_PATH? BTW, python2 is no longer supported by official team, I think it's would be better upgrade pywrapper into python3.
Some usage is not work well with python3  such as:
            print "type is not supported: ", type(value)

Have you run source cyber/setup.bash first? I think that script sets the CYBER_PATH environment variable.

thanks @christian-lanius . that is the solution.


Multi-singer models

I guess people already have done several experiments with enunu though, I'd like to try it and make reproducible recipes in nnsvs. It should be conceptually pretty easy to implement.

This should be pretty straightforward but I don't think I have the time to do this for a while. Removing the milestone.


hack: Ensure we gather the Pod description artifacts during e2e runs

Update the gather testing artifacts bash script and ensure we gather the
kubectl describe <pod> ... output for each Pod in a testing namespace.

/override ci/prow/metering-e2e-aws
/override ci/prow/metering-upgrade-aws

/override ci/prow/metering-e2e-aws
/override ci/prow/metering-upgrade-aws


Comparison lists

So I can see where I need to improve to be 100% better than Muzgrob.

Late update for anyone following progress in this fork:
Addressed in https://github.com/edelkas/inne/commit/b4a723805f980939855a045de43d38150a393cac and https://github.com/edelkas/inne/commit/e572f495422220cf1f32ae63ca57fd0348a43c5c on 01 Jun 2021


set delegate cli

This lets a mango account owner, set a delegate. The delegate can then operate the account i.e. sign the transactions. Delegate cant withdraw funds.
e.g.
yarn cli set-delegate mainnet.1 <mango-account-pk> <delegate-pk> --keypair /Users/mc/.config/solana/<mango-account-owner-keypair>.json --config src/ids.json --cluster mainnet

Signed-off-by: microwavedcola1<EMAIL_ADDRESS>

this is good. I'd probably remove the cluster arg in the CLI command because cluster is implied from group but that's a minor complaint


Error: IndexError: list index out of range in LoRAW Gradio Interface When Loading LoRA Model

Issue Description:
I encountered an error while running a trained LoRA checkpoint in the Gradio interface for LoRAW. The model loads successfully, but when attempting to generate audio, it throws an IndexError: list index out of range.
Error Log:
/workspace
Creating model from config
No module named 'flash_attn'
flash_attn not installed, disabling Flash Attention
/usr/local/lib/python3.10/dist-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
Loading model checkpoint from /workspace/model.ckpt
Done loading model
Found 170 candidates for LoRA replacement
LoRA registered: stable_audio_open_finetune_loraw1
Running on local URL:  http://<IP_ADDRESS>:7860
Running on public URL: https://b59f39fd94fc1607b4.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
Prompt: ttett
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gradio/queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/route_utils.py", line 321, in call_process_api
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1935, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 833, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "/workspace/LoRAW/interface/gradio.py", line 175, in generate_cond
    lora_merger.merge({lora_names[0]: lora1, lora_names[1]: lora2, lora_names[2]: lora3})
IndexError: list index out of range

Steps to Reproduce:

Run the LoRAW interface with the following command:%cd /workspace
command = (
    "python LoRAW/run_gradio.py"
    " --model-config /workspace/model_config_loraw.json"
    " --ckpt-path /workspace/model.ckpt"
    " --lora-dir /workspace/Lora-Model"
)
!{command}

The model successfully loads, and LoRA candidates are registered.
On submitting a text prompt, the error IndexError: list index out of range is triggered at gradio.py:175.

Additional Context:

I am using a pre-trained LoRA checkpoint with a .ckpt file.
Should I unwrap the model similar to how it's done with a vanilla model, or is it correct to load the checkpoint directly since it's already in the .ckpt format?

Any help resolving this issue or guidance on properly handling LoRA model checkpoints in this interface would be appreciated.

Hey there, Gradio can't do variable number of components so when I hard-coded for up to 3 loras I forgot to check for fewer than 3. Fixed now.


Fix readme

Codecov Report

Merging #70 (ce7bea3) into main (b5a8215) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #70   +/-   ##
=======================================
  Coverage   96.29%   96.29%
=======================================
  Files           2        2
  Lines          27       27
  Branches        6        6
=======================================
  Hits           26       26
  Misses          1        1

Continue to review full report at Codecov.

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


Change link https://www1.canada.ca/en/government/about.html

In Canada.ca, the footer link “About Canada.ca” has been updated to https://www.canada.ca/en/government/about.html
This has been fixed in https://ssl-templates.services.gc.ca/app/cls/WET/gcweb/v4_0_32c/cdts/samples_test/breadcrumbs-en.shtml. We will closed the issue it when release v4_0_32c will be released.

Hi
I checked https://ssl-templates.services.gc.ca/app/cls/WET/gcweb/v4_0_32c/cdts/samples_test/breadcrumbs-en.shtml. It seems the link "About Canada.ca" goes to https://www.canada.ca/en/newsite.html which is not the same URL than in canada.ca (https://www.canada.ca/en/government/about.html), even if it goes to the same page.
Thanks

@laurencechavet Could we close this issue?
About Canada.ca from https://www.canada.ca/en.html goes to
https://www.canada.ca/en/government/about.html

Hi
I was waiting for the release of 4.0.39 to answer. This is still not fixed
From https://cenw-wscoe.github.io/sgdc-cdts/docs/index-en.html#Static_pages_.28version_.2F_run.29, we can get the static pages for the 4.0.39 and the link in the footer is still pointing to https://www.canada.ca/en/newsite.html instead of https://www.canada.ca/en/government/about.html. The static files in the CDTS package must be modified to match the WET.

Thanks

Hi
I was waiting for the release of 4.0.39 to answer. This is still not fixed
From https://cenw-wscoe.github.io/sgdc-cdts/docs/index-en.html#Static_pages_.28version_.2F_run.29, we can get the static pages for the 4.0.39 and the link in the footer is still pointing to https://www.canada.ca/en/newsite.html instead of https://www.canada.ca/en/government/about.html. The static files in the CDTS package must be modified to match the WET.

Thanks

Hi @laurencechavet, I just saw this issue. I went ahead and updated the link for About Canada.ca.
The change is live now so you can re-download the zip file. Let me know if there are any issues.

Hi @laurencechavet, I just saw this issue. I went ahead and updated the link for About Canada.ca.
The change is live now so you can re-download the zip file. Let me know if there are any issues.

All good now
Thanks a lot
You can close the case

All good now
Thanks a lot
You can close the case


update GH Action versions

REF: https://github.com/actions/setup-node#usage

Thank you, already fixed in another PR.


Prove package scoped MSR based controls are working

The geopmread/write testing is exposing a potential issue where writing a control to a package scoped MSR may not actually result in the desired change at the CPU level.  The msr_hsx.cpp file shows IA32_PERF_STATUS and PERF_CTL as being M_DOMAIN_CPU vs. msr_knl.cpp shows them as M_DOMAIN_PACKAGE.  The fact that they're package in the case of KNL may be part of the culprit.
This may result in a change to all our package scoped controls such that they write to all CPUs instead of just one.
Controlling frequency via IA32_PERF_CTL and IA32_PERF_STATUS were used to uncover this.

Confirmed that setting frequencies for individual CPUs works on mcfly (SKX).  On quartz, I am not seeing the frequencies I expect.
On KNL, setting package frequencies works with this patch: https://review.gerrithub.io/#/c/geopm/geopm/+/411494/

Package scoped controls fixed by: c2e6a9199f89e4984c74d2640e7821551f518b13
CPU controls changed to core scope by: 1e659437f8665364df7dc76c64da8aac3b900afd


GH-56 Add potion effects in combatlog

Closed due to https://github.com/EternalCodeTeam/EternalCombat/pull/116


Correct TypeScript definition format

Hey! I come from the linked Typings registry issue and wanted to check it out, and I saw this issue. You don't want to create an "ambient/global" declaration, it needs to be an external module definition. Basically, move everything inside the declare module '...' outside and remove it. See more at http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html.

Thanks for taking the time to come here and say these words! Do the  words mean I should change the index.d.ts to look more like this:
  export function extension(filename: string): string;
  export function basename(filename: string): string;
  export function removeSuffix(filename: string): string;
  export function removeSuffixWithDelimiter(delimiter: string|number, filename: string): string;
  export function appendSuffix(suffix: string, filename: string): string;
  export function appendSuffixWithDelimiter(suffix: string, delimiter: string|number, filename: string): string;
  export function directoryName(filename: string): string;

Yes, correct.

I tried this, but now when I try to use the definition file, I get "TS2307: Cannot find module 'filename.js'

@faceleg How did you test it?

It needs to be using node module resolution in tsconfig.json.

I tested it by making a project like:
/index.ts
/node_modules/filename.js/...

With the file:
/// <reference path="node_modules/filename.js/index.d.ts" />

import filenameJs = require("filename.js");

console.log(filenameJs);

Don't use a reference, use node module resolution in tsconfig.json.

Use http://www.typescriptlang.org/docs/handbook/tsconfig.json.html. When you set commonjs, it uses node module resolution by default.

You mean like tsc -m commonjs

Yes. The reference wouldn't be doing anything here anyway. See http://json.schemastore.org/tsconfig and the moduleResolution option.

Thank you very much for sticking with me on this.
I'm getting "TS5023: Unknown compiler option 'moduleResolution'"
tsc --version
message TS6029: Version 1.5.3

You're using a really old version of tsc. Try >=1.6. The current version is 1.8.

Something bung with my system, you're right it compiles with moduleResolution in tsc config.

With the removal of the declare module "filename.js" portion of the definition, I no longer get the "external package is not a module" error, but I also no longer get any type hinting in my editor (vim, with tsuquyomi + YCM).

I can't comment on the VIM plugin, try using Atom or Sublime Text or VSCode. Have you updated the global TypeScript version too?

@blakeembrey thanks for your help. I think I've solved it by just using @types with typescript 2.0 and enabling the declaration flag for the compiler.

Ok. I'm still confused by why @types comes into this at all. You're providing the definition with the module, you shouldn't be using @types at all.

You're right, my comment was confusing. I should have just mentioned the declarations flag.


[Build] Define EIGEN_MPL2_ONLY

Caffe2 is distributed under the Apache 2.0 License and it can be built with Eigen3 as BLAS back-end. Eigen3 is a header-only library containining some GNU LPGL code. Without defining the preprocessor symbolEIGEN_MPL2_ONLY during compilation, Caffe2 may incorporate LGPL code and thus become licensed under LGPL instead of the Apache 2.0 License (see the file COPYING.README in the Eigen repository). Currently, Eigen headers are always included in the build (see #1355) and the only way to guarantee that no re-licensing takes place is to export the environment variable CXXFLAGS containing -DEIGEN_MPL2_ONLY, e.g.,:
env CXXFLAGS=-DEIGEN_MPL2_ONLY cmake -- /path/to/caffe2

Please define the preprocessor symbol EIGEN_MPL2_ONLY for all builds with Eigen code.

Thanks! We intended to use that indeed (https://github.com/caffe2/caffe2/blob/eea00f1554d41c9fecdbaabb7f57bac6cc625136/cmake/Dependencies.cmake#L237) but did not set the macro. #1372 fixes this.


Get a11y status message

What: getA11yStatusMessage is exposed to user through Menu (Issue #37)

Why: Allows users to create custom ARIA messages

How: Accept getA11yStatusMessage as a prop to be passed from Menu to MenuStatus

Checklist:

[X ] Documentation
[ ] Tests
[ ] Ready to be merged
[ X] Added myself to contributors table

Not sure about how to word documentation since I'm still new with ARIA-related things. Revision suggestions would be appreciated!

Codecov Report

Merging #48 into master will increase coverage by 0.2%.
The diff coverage is 25%.

@@            Coverage Diff            @@
##           master      #48     +/-   ##
=========================================
+ Coverage   18.34%   18.55%   +0.2%
=========================================
  Files           8        8
  Lines         218      221      +3
  Branches       45       46      +1
=========================================
+ Hits           40       41      +1
- Misses        139      140      +1
- Partials       39       40      +1

Impacted Files
Coverage Δ

src/menu.js
32.55% <0%> (ø)
:arrow_up:

src/input.js
33.33% <33.33%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Ah, I accidentally undid the last merged PR. Let me fix that

Woo, thanks! 🎉


Feature/diamond loupe

Add unit test for DiamondLoupe

Could you add tests with several facets where several selectors, please? Where you add/remove/edit it?


Fix for parsing non-Latin characters (Unicode outside 256 symbols range)

It's a very simple fix, but a pretty significant one. Players/tournaments that had non-Latin characters were not omitting any errors while parsing, but ended up producing pgns with corrupted names.

thanks for spotting, I will merge this.
However: which CB version did you use to create the database? I am very sure, that the older ones were unaware of UTF-8 (i.e. any Fritz/CB before 2000) and only supported Latin1. They might have changed at some point. I fear there will be problems with umlauts and other European characters on older databases (with newer version I've just checked, everything is encoded as UTF-8).

I used CB 16 for my database, one of the newer ones.
Old versions of CB require testing, I'm afraid. An optional argument could be provided to specify encoding, if UTF-8 becomes a problem.


The latest version of the 64-bit exe is triggering Windows Defender

False positive, it seems Windows Defender is not detecting it anymore.
I released <IP_ADDRESS> just in case it still is.


Input::only() inconsistent with array_only()

array_only works as you'd expect, returning ony the keys that actually exist, ala
$results = array_only(['foo' => 'bar', 'bip' => 'bap'], ['foo', 'missing']);
// $results = ['foo' => 'bar'];

You'd expect Input::only() to be identical, ala
Input::only($keys) === array_only(Input::all(), $keys)

But it's not.
Using the above example:
// input = ['foo' => 'bar', 'bip' => 'bap']
$results = Input::only(['foo', 'missing']);
// $results = ['foo' => 'bar', 'missing' => null]

That's a disastrous situation because it means I'll be saving fields back to the database that weren't intended to be saved (because they're were missing from the original input values in the first instance).
I did change the code to:
foreach ($keys as $key)
{
	if (array_has($input, $key))
	{
		array_set($results, $key, array_get($input, $key));
	}
}

But in looking through the tests, it appears that this was intended behaviour:
$request = Request::create('/', 'GET', array('developer' => array('name' => 'Taylor', 'age' => 25)));
$this->assertEquals(array('developer' => array('name' => 'Taylor'), 'test' => null), $request->only('developer.name', 'test'));

In my opinion this is nonsensical, inconsistent, and very easily allows buggy code to be created by allowing developers to fall into the trap of assuming that it'll also filter out those values which weren't passed back for whatever reason (in my case, the form field is disabled to prevent it being updated - which doesn't help then when it gets saved back as an empty value)

In my opinion this behaviour makes perfect sense. Especially when mapping input to a command for example, you want to make sure all fields specified in Input::only(...) are passed through.

@haampie Even if they weren't supplied as input values??
I'd say something like Input::every($keys) would make sense in that case... every $key would be returned, regardless of whether it was supplied as input or not

We;re open to pull requests with tests to the master.


Create Own Timeout

Added the ability to change the timeout from the default of 2000 msec.
ku16MBResponseTimeout was renamed to ku16MBDefaultTimeout.  The private variable _u16ResponseTimeout was created, along with getResponseTimeout() and setResponseTimeout() methods.

Description
[Describe what this change achieves]
Issues Resolved
[List any existing issues this PR resolves; include Fixes #xxx or Closes #xxx (where xxx is issue number)]
Check List
General

[ ] Code follows coding style defined in STYLE.md
[ ] Doxygen comments are included inline with code
[ ] No unnecessary whitespace; check with git diff --check before committing.

The following have been modified to reflect new features, if warranted

[ ] README.md
[ ] keywords.txt (use tabs as whitespace separators)
[ ] library.properties
[ ] examples/ - update or create new ones, as warranted

The following have NOT been modified

[ ] doc/ - will be updated upon versioned release
[ ] .ruby-gemset
[ ] .ruby-version
[ ] CHANGELOG.md - will be updated upon versioned release (HISTORY.md is deprecated)
[ ] Gemfile
[ ] LICENSE
[ ] VERSION - will be updated upon versioned release

Very important feature which should be present already. Great work.

useful change, thanks


CONTRIBUTING.MD ToC is obsolete

What do you mean by this? There are parts that still seem relevant?

What do you mean by this? There are parts that still seem relevant?

Updated the title. For example ToC refers to "apply and sync Behavior" which is not relevant currently.

Ah I see. There is native ToC that stays up to date in the GitHub UI. Maybe we just delete the ToC? Thoughts @dfellis @aguillenv ?

I do not follow this sentence "There is native ToC that stays up to date in the GitHub UI". This task should just update the ToC, right? Or are you suggesting we remove it because Github UI can give us something?

Or are you suggesting we remove it because Github UI can give us something?

I am suggesting this. That way we don't have to keep it up to date


Getting the discord server status page causes a crash.

Tested and reproduced on Xbox One, Quarrel Insider 20.6.25.
The behavior of this is weirdly inconsistent. Sometimes throws an arg_nullreferenceexception, sometimes doesn't trip the crash handler at all.
I suspect Discord has changed the way their API makes this work.

I have that same error message on my Xbox too, I get it whenever I've clicked on the status.

This should be fixed in the most recent build.


Hover state/ home page /Accessibility issue

Current hover state (B) on home page engagements greys out text/buttons.
Please see attached image for reference. Should be link A (not B)
Xd demo: https://xd.adobe.com/view/3c3a99aa-4de1-42ec-ac36-ce2046fe7165-6969/

Verified


Database Support

This is partially a question, possibly a request.
Presumption:  This chart doesn't appear to support configuring a database other than H2 (I would be happily wrong, am I missing something?)
Expectation: The helm chart would support configuring Postgres, MySQL, etc. via db.properties, including secrets retrieval for DB credentials, and so on.
Again, unless I'm missing something, is the expectation that users would customize the gocd-server image?
Thanks!

We are looking to implement this now outside the helm chart if necessary. My use case is specifically with Google Cloud SQL. If I produce any decent way to do it, I'll report back.

We ended up using a sidecar container in the helm chart for this:
  # Sidecar containers that runs alongside GoCD server.
  # https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/
  sidecarContainers:
    # - name: sidecar-container
    #   image: sidecar-image:latest
    #   volumeMounts:
    #     - name: goserver-vol
    #     mountPath: /godata
    - name: cloud-sql-proxy
      image: gcr.io/cloudsql-docker/gce-proxy:1.27.0
      command:
        - "/cloud_sql_proxy"
        - "-ip_address_types=PRIVATE"
        - "-credential_file=/secrets/credentials.json"
        - "-log_debug_stdout=true"
      securityContext:
        runAsNonRoot: true
      resources:
        requests:
          memory: "2Gi"
          cpu: "1"
      volumeMounts:
        - name: cloud-sql-proxy
          mountPath: /secrets/
          readOnly: true

Along with db.properties as a secret in the helm chart as well. Seems to be a satisfactory solution if you're running on GKE using Cloud SQL.

Does anyone have an example of how they configured the secret for this? Using volume mounts doesn't work as it makes the config directory a read only file system on newer versions of Kubernetes

you mean the db.properties? Here is my code:
resource "kubernetes_secret" "db_properties" {
  metadata {
    name      = "db-properties"
    namespace = kubernetes_namespace.gocd.metadata.0.name
  }

  data = {
    config = <<-EOF
    db.driver=org.postgresql.Driver
    db.url=jdbc:postgresql://localhost:5432/gocd
    db.user=gocd
    db.password=${random_password.gocd.result}
    EOF
  }
}

My values:
    extraVolumes:
      - name: cloud-sql-proxy
        secret:
          secretName: cloud-sql-proxy-credentials
          # checkov:skip=BC_GIT_6: False positive
      - name: db-properties
        secret:
          secretName: db-properties
          # checkov:skip=BC_GIT_6: False positive
          items:
            - key: config
              path: db.properties

    # server.persistence.extraVolumeMounts additional server volumeMounts
    extraVolumeMounts:
      - name: db-properties
        mountPath: /godata/config/db.properties
        subPath: db.properties
        readOnly: true

If that's not what you're after hit me up because I do have it working.

you mean the db.properties? Here is my code:
resource "kubernetes_secret" "db_properties" {
  metadata {
    name      = "db-properties"
    namespace = kubernetes_namespace.gocd.metadata.0.name
  }

  data = {
    config = <<-EOF
    db.driver=org.postgresql.Driver
    db.url=jdbc:postgresql://localhost:5432/gocd
    db.user=gocd
    db.password=${random_password.gocd.result}
    EOF
  }
}

My values:
    extraVolumes:
      - name: cloud-sql-proxy
        secret:
          secretName: cloud-sql-proxy-credentials
          # checkov:skip=BC_GIT_6: False positive
      - name: db-properties
        secret:
          secretName: db-properties
          # checkov:skip=BC_GIT_6: False positive
          items:
            - key: config
              path: db.properties

    # server.persistence.extraVolumeMounts additional server volumeMounts
    extraVolumeMounts:
      - name: db-properties
        mountPath: /godata/config/db.properties
        subPath: db.properties
        readOnly: true

If that's not what you're after hit me up because I do have it working.

Thank you this is what I was after, thank you. I tried the above but then got an error when the server pod started complaining that the config directory was a read only file system...


The MacOS Python 2.7 test has an intermittent error

It is usually cured by rerunning it, but an intermittent error is an error: something's wrong. The error manifests itself as a ValueError evaluating (I think!) one of the reducer tests.

         It's probably working "by accident" on other platforms and for most runs of MacOS.
When I re-ran the test, the original URL now points to the wrong place (a Windows build?), so it's no longer a useful link. The re-run passed, so it really is intermittent.

@ianna Even though this argsort bug only happens intermittently in MacOS, it's a sign that the other cases (Linux and Windows all the time, MacOS most of the time) are relying on a happy accident of undefined behavior. Something is wrong in argsort that needs to be fixed. Until that happens, I'll need to remove high-level access to argsort to prevent data analysts from using it and possibly getting wrong answers in their analyses.
Do you have reason to believe that it's confined to argsort or should I temporarily disable sort as well? Do you think you'll get a chance to look closely at it on a shorter timescale that it would take me to disable it (which is about a day or two)?

@ianna Even though this argsort bug only happens intermittently in MacOS, it's a sign that the other cases (Linux and Windows all the time, MacOS most of the time) are relying on a happy accident of undefined behavior. Something is wrong in argsort that needs to be fixed. Until that happens, I'll need to remove high-level access to argsort to prevent data analysts from using it and possibly getting wrong answers in their analyses.
Do you have reason to believe that it's confined to argsort or should I temporarily disable sort as well? Do you think you'll get a chance to look closely at it on a shorter timescale that it would take me to disable it (which is about a day or two)?

@jpivarski - I could not reproduce it :-(
I'm going to reimplement kernel functions for both sort and argsort.


[Bug]:  puppeteer 20.6.0 introduced a regression (with iframe?) that now is Error: Requesting main frame too early!

Minimal, reproducible example
i can't give the code to reproduce because is a business code, so probably this will be a "closed" ticket, but anyway i can describe it, i hope can be useful.
the same error is repored here by other users, no one could understand how to reproduce systematically.
Error string
Error: Requesting main frame too early!
Bug behavior

[ ] Flaky
[ ] PDF

Background
i open a browser, i open a page, a navigate to a webpage, i click a button, that opens a iframe, i take a reference to the iframe, i write some text, i click a button that close the iframe, and the error occur and the browser is closed (or the browser is closed and then the error occur).
that test worked for 2 years until the introduction of puppeteer 20.6.0
the website still the same
Expectation
when the website close the iframe, the execution of the code should keep working.
Reality
when, clicking a button, the website close the iframe, the browser close and the error is raised (or the error is raised and so the browser close)
until puppeteer 20.5.0 this was working.
with puppeteer 20.6.0 you obtain

failed: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed..

with puppeteer 21.3 or also 21.4.1 you obtain

Error: Requesting main frame too early!.

Puppeteer configuration file (if used)
No response
Puppeteer version
21.4.1
Node version
18.16.1
Package manager
npm
Package manager version
9.5.1
Operating system
Windows

@andreabisello can you create a test page that resembles the real issue?

The error indicates that there is an action on the main frame but Puppeteer has not received the information about the main frame from the browser yet. Perhaps it is a race condition but it would also depend on how exactly the frame is accessed.

@OrKoN i cant because is company code that test company software. maybe i should create a website with an iframe and a button that open that iframe, makes something, and close the iframe.
they way i access the frame is that one
        let creationFrame
        while(!creationFrame){
            await page.waitForTimeout(1000)
            for(const frame of page.mainFrame().childFrames()){
                if(frame.url().includes("EditorFatturaPA")){
                    creationFrame = frame
                }
            }
        }

then i make every interation using "creationFrame" , for clicking typing etc ...
then when i click the button that close the frame
        await creationFrame.evaluate(
            () => {
                document.querySelector("body > div.bootbox.modal.fade.in > div.modal-dialog > div > div.modal-footer > button.btn.btn-sm.btn-success").click();
            }
        )

the problem raise.
maybe i could wrap that evaluate in a try - catch expecting some kind of exception. now i try.

I had a simmilar Error with Puppeteer Version 21.4.1 but that is fixed for me with Version 21.5.0 now

This issue still persists in version 21.5.2 and it cannot be reproduced reliably.
It happens during the call to Page.goto() at random times, especially after the application has been running for a while (4-5 hours seems to be the sweet spot).
The main problem is that once this happens, all future calls to Page.goto() will immediately fail with the same error and there's no apparent way to work around this without restarting the application.

I'm using 21.4.1
It happens to me too today several times when calling Page.goto()
I even tried a sleep promise for 30 second to make sure that the page is loaded but still sometimes there is the same error.
Note: I'm using  "puppeteer-extra" which is built in top of "Puppeteer"

I found a solution!
1 - Upgrade to 21.5.2
2 - I'm using nestJs, and I have 2 modules (channel service and upload service):
channel service
//properties
browser: Browser
page: Page

// methods
public async initBrowser() {...}

public async connectToChannel(externalPage?: Page){
   const page = this.page || externalPage // that line causes the problem
   this.page = page
   page.goto('studio.youtube.com') // here where the error is thrown
   ....
}

...other methods

upload service
// properties
private browser: Browser;
private page: Page;
constructor(private readonly channelService: ChannelService) {}

public async uploadVideo() {
   this.browser = await browser.launch({headless: false}) // changing launching params didn't do anything to solve the problem
   await this.channelService.connectToChannel(this.page)
   ... rest of code
}

what I basically did is I changed this line of code on my channelService and it works
const page = externalPage || this.page

I was able to reproduce this when one of the args for puppeteer launch had  "--single-process", when removing it it worked fine.

This issue still persists in version in 21.5.2.
I dont use "--single-process".

This still happen with puppeteer 21.6.0
I cannot share the code too as this is a SSO login page from Microsoft for a large company, but basically the browser crashes when the page loads the login form with:
Error: Requesting main frame too early!
This does not occur up to 21.4.1

Confirmed, I have the same error and probably associated with iframes
Error: Requesting main frame too early!

I've encountered a similar phenomenon. It occurs about once in every ten times. I am running Puppeteer version 21.5.2 on AWS Lambda. The process involves accessing three URLs twice each, and usually, this error occurs on the sixth and final access. I am accessing all of them using goto. Also, there is a process where I take about ten screenshots along the way.

have same error, when i do 20 times goto, it giving this error and my process hang up

Are you awaiting page.goto to finish properly? if it's timing out or you are not awaiting it, the frame might not be there yet resulting in this error if you try to access it. Could anyone provide a minimal reproducible example?

i have one browser which 20 tabs (for example) then i open this tabs, and i have express server. /add route, when user reach this route, my code find free tab, open site, make screenshot, when i launch 3 tasks two times, after some 10-20 seconds it hang and show this exception, then page.url() crash app.

Are you awaiting page.goto to finish properly? if it's timing out or you are not awaiting it, the frame might not be there yet resulting in this error if you try to access it. Could anyone provide a minimal reproducible example?

i have one browser which 20 tabs (for example) then i open this tabs, and i have express server. /add route, when user reach this route, my code find free tab, open site, make screenshot, when i launch 3 tasks two times, after some 10-20 seconds it hang and show this exception, then page.url() crash app. also if i do nothing, after some time - it crashed when i trying interact with page object, like get actual url()

i also figured out, and with createIncognitoBrowserContext all works fine, i just create new context when need newPage, and closing context also with page.close().
i think when i use one browser to open 10 tabs for example, is using one cdp connection and sometimes it overflows, and giving this exception, maybe different context using own cdp.

Are you awaiting page.goto to finish properly? if it's timing out or you are not awaiting it, the frame might not be there yet resulting in this error if you try to access it. Could anyone provide a minimal reproducible example?

i have one browser which 20 tabs (for example) then i open this tabs, and i have express server. /add route, when user reach this route, my code find free tab, open site, make screenshot, when i launch 3 tasks two times, after some 10-20 seconds it hang and show this exception, then page.url() crash app. also if i do nothing, after some time - it crashed when i trying interact with page object, like get actual url()

i also figured out, and with createIncognitoBrowserContext all works fine, i just create new context when need newPage, and closing context also with page.close(). i think when i use one browser to open 10 tabs for example, is using one cdp connection and sometimes it overflows, and giving this exception, maybe different context using own cdp.

also can confirm it happen only with headless mode, in non headless all works fine

first i had to deal with memory leak caused by puppeteer
upgraded, now have to deal with fucking Requesting main frame too early!
fuck this lib

If someone is able to provide a minimal reproducible example to confirm the scenario, it would be great.

I think I've found the solution.
I posted it on stackoverflow and I'll post it here
If you look in the puppeteer docs, it says a puppeteer instance is set to timeout in 30000ms (30seconds) by default.
puppeteer docs launchoptions
so when initialising the instance set the timeout option higher. I set mine to<PHONE_NUMBER>0ms (365 days)
const browser = await puppeteer.launch({timeout:<PHONE_NUMBER>0});
stackoverflow solution

@mshokoya How to catch a possible error when launch is not launched within 30 seconds?

I can think of 2 ways to catch the errors in puppeteer

launch puppeteer and put all your puppeteer logic in the same try/catch block e.g

  try {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    await page.goto('https://example.com');
    await page.screenshot({path: 'example.png'});

    await browser.close();
  } catch (error) {
    console.error('An error occurred:', error);
  }

use events. here are links to all events. but for the timeout error I think you'll need the page events. in there there are two events that look promising the 'error' event and the 'pageerror' event. e.g

  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  page.on('page error', request => {
    console.error(`Request failed: ${request.url()}`);
  });

  page.on('error', request => {
    console.error(`Request failed: ${request.url()}`);
  });

  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});

  await browser.close();

But for the 'Error: Requesting main frame too early!' error. It can be prevented by increasing the default timeout set by puppeteer. (I increased mine from the default 30 seconds to 356days). you can increase it by whatever you want, it could be 60 seconds, it could be 1 hour. e.g
  const browser = await puppeteer.launch({timeout:<PHONE_NUMBER>0, headless: true});
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});
  await browser.close();

hope this answers your question

@mshokoya What you showed is not a solution to the problem at all, as the browser opens in less than 30 seconds.

@shadaxv after puppeteer launches ( i.e browser is open) the 30 second count down is started. after the 30 second countdown the page automatically closes due to the timeout being reached... if you then try to call a page method ( i.e page.waitForSelector() ) you will get the error

Error: Requesting main frame too early!

in other words the error occurs when you try to call a page method ( i.e page.url() or page.$ ) when the page is closed
have you tried my solution ? did it not work for you ?

@mshokoya timeout is Maximum time in milliseconds to wait for the browser to start - to start not to run
protocolTimeout is set to 180 seconds by default, do you really think puppeteer would have a default time limit of 30 seconds to execute the script?
I have tried your solution and it is not working for me, in my case, the problem is irregular, and so far no solution I have tried has gotten rid of it

@shadaxv well it works for me. Ive tested it multiple times,  if I leave it out, error occurs within 30 seconds. I set the timeout limit higher and I don't get the error. it may not work for you but it may work for someone else

Is there a fix for this? it happens randomly with high probability which makes the automation nearly unusable..

Also looking for help on this one it append when I try to make async with puppetter

Same issue, any updates?

I was seeing occasional Requesting main frame too early! errors on 22.1.0. I applied #12225 as a patch on 22.1.0 and now see occasional Attempted to use detached Frame... errors instead.
Before:
Error: Requesting main frame too early!
  File "*****.js", line 65322, col 15, in assert
    throw new Error(message);
  File "*****.js", line 77371, col 32, in FrameManager.mainFrame
    (0, assert_js_1.assert)(mainFrame, "Requesting main frame too early!");
  File "*****.js", line 78997, col 35, in _CdpPage.mainFrame
    return this.#frameManager.mainFrame();
  File "*****.js", line 71199, col 29, in _CdpPage.goto
    return await this.mainFrame().goto(url, options);
  File "*****.js", line 811834, col 32, in exports.directHandler
    await page.goto(*****);

After:
Error: Attempted to use detached Frame '14424CDFADC9787ADAB520A75C4FC3A9'.
  File "*****.js", line 67191, col 19, in CdpFrame.<anonymous>
    throw new Error(message(this));
  File "*****.js", line 71199, col 41, in _CdpPage.goto
    return await this.mainFrame().goto(url, options);
  File "*****.js", line 811836, col 32, in exports.directHandler
    await page.goto(*****);

@charliefuller that makes sense, does the detached frame error indicate which page is detached for you? is the page perhaps crashed or you are using a stale page reference?
We do not have a reproducible example for this issue so it probably just pages that crash or stale references. With the assertion not firing it is now possible to catch it. If anyone has a reproducible example, please share it.

@charliefuller do you have a reproducible example? is the page in the middle of another navigation/aborted/errored navigation when this happen?

@OrKoN It seems to happen randomly but when it does happen it's usually while waiting on await page.waitForFunction(...)

@charliefuller is it possible that sometimes waitForFunction keeps running while the page is navigating/redirecting? Perhaps, sometimes the waiting is done before the page somehow goes stale? it would be really great to get some example of what sort of interactions are happening. For example, we use Puppeteer in Chrome DevTools tests and we have not once caught this issue (same with our own tests) and we do a fair bit of waitForFunction/navigations on a single page. Are you running this on third party pages? is there a pattern in what sites it happens on?

In my case it is happening for some particular session and also very rarely,other sessions are working smoothly . by making protocol Timeout can we overcome this error or do we have any other solution for this .

it happens to me too at odd patterns
im running on V 22.11.1 on. nestJS application
`async request(opts: ProviderInput): Promise {
const browser = await BrowserManager.getBrowser();
const page = await browser.newPage();
const response = await page.goto(opts.url, {
waitUntil: 'networkidle0',
timeout: opts.timeout,
});
await page.close();
  return {

...response
};
}`

Can confirm this issue, but can not reproduce it. It appears to be random.


Debug Console merges newlines

In OSX, for the Output message "Hello\n\n\nWorld", Debug Console only printed two lines and missed the middle \n\n .
In Windows 10, the Output message is "Hello\r\n\r\n\r\nWorld", Debug Console printed all newlines correctly.

/duplicate of #69535


Create Azure function with SQL Binding when AzureFunctionCoreTools v3 is not installed

SQL Bindings 0.0.1
Steps to Reproduce:

Uninstall azure function core tools v3 (can run npm ls -g azure-functions-core-tools@3 and brew ls azure-functions-core-tools@3 to see if it is installed.

Run Create Azure Function with SQL Binding

Follow prompts

Issue with createFunction API since we pick a specific target framework:

The issue is that the project version defaults to the latest GA version which would be v4 and therefore the target frameworks used for v4 would be .Net 6.

workaround would be to have users install azure function core tools v3 (which is already a requirement for using azure function for C# with .NET 3.1 )


How to work with lower case identifier names?

It doesn't appear to respect quoting for case sensitive identifiers (rk is the same as RK, at least for CREATE TABLE).  And standard SQL identifier quoting like "rk" breaks the SQL parser.

Identifiers must be quoted using backticks ( ` ), see also this part of the documentation of Google CloudSpanner: https://cloud.google.com/spanner/docs/lexical#identifiers. These backticks are also accepted by the SQL Parser of the JDBC Driver.

Here is an example of a create table statement in which we quote both the table and column name, yet the Google admin tool shows them all in upper case.  It is possible to manually create tables with mixed case identifiers (well, case-insensitive, case-preserving).
create table `SomeTableName` (
`creation_instance` int64
) PRIMARY KEY (creation_instance)

Is this just a limitation of the API the driver is using?


Bug: unable to copy repository labels from opensauced.pizza

Describe the bug
This worked for explore:
npx octoherd-script-copy-labels \
  --template "open-sauced/open-sauced" \
  -T $GH_TOKEN \
  -R "open-sauced/docs.opensauced.pizza"

We don't have any labels
To Reproduce

Expected behavior

Screenshots

Desktop

OS:
Browser:
Version:

Smartphone

Device:
OS:
Browser:
Version:

Additional context
maybe @bdougie has some ideas on workarounds if the script doesn't work

Seems to have just worked today - as a note, it got a different order of labels than the requests that were failing


samba: 4.13.3 -> 4.13.4

Motivation for this change
Update
In combination with #111249 , this seems to fix the samba4Full build failures.
I ran the samba and glusterfs tests, a build for glusterfs and sambaFull with both updates applied.
Everything checked out.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[X] other Linux distributions

[X] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@ofborg test samba glusterfs


Add test for switching active interpreter

Fixes #5478

Codecov Report

Merging #9873 (71a6d7d) into main (131f6c3) will increase coverage by 0%.
The diff coverage is n/a.

@@         Coverage Diff          @@
##           main   #9873   +/-   ##
====================================
  Coverage    63%     63%
====================================
  Files       203     203
  Lines      9826    9826
  Branches   1564    1564
====================================
+ Hits       6243    6245    +2
- Misses     3079    3080    +1
+ Partials    504     501    -3

Impacted Files
Coverage Δ

src/platform/common/utils/misc.ts
67% <0%> (-5%)
:arrow_down:

src/platform/common/cancellation.ts
64% <0%> (-4%)
:arrow_down:

src/platform/api/pythonApi.ts
71% <0%> (+<1%)
:arrow_up:

src/platform/errors/errorHandler.ts
69% <0%> (+3%)
:arrow_up:


Removing .env from dockerignore - potential issue

ADO-XXX
Fixed AB#
There's an issue with the build pipeline that may be caused by my inclusion of .env in the .dockerignore file.
This removes that line.
Changelog - "fix:" for bug fixes, "feat:" for features. Read more about Conventional Commits at https://www.conventionalcommits.org/en/v1.0.0/#summary
Description of proposed changes:
Remove .env* from dockerignore file
What to test for/How to test
If the dev site loads again.
Additional Notes

Something weird is happening with the rebase. I am just going to make a new PR.


refactor(BaseClass): reduces amount of created objects/functions

Utilizes prototype & Symbol instead of closure. This speeds up creation of overlays on map (markers, polygons, etc) and reduces amount of used memory.
Changes:

implemented EventEmitter completely on JS without DOM events
Moved all methods into prototype to reduce memory usage
hid variables and subscriptions under dynamic field name or Symbol if available
deperecated bindTo, replaced it with sync mehod
adds destroy which calls off and empty

Please provide more information. The prof of reduce memory and improve speed up.
Also test code.
And why did you remove the hash code property?
You should not remove the property currently provided.

I haven't removed hashCode:
Object.defineProperty(this, 'hashCode', { value: Math.floor(Date.now() * Math.random()) })

And also you should not change the method name, bindTo().
I designed this plugin similar with the Google Maps JavaScript v3.
And also did you test this code does not affect any current code, even multiple maps?
If you did, please provide how did you test?
This only JS code, and BaseClass effects or affects all classes, so you are trying to make a big change.
I believe you created safe test code a lot.
I can not accept your pull request soon. Please provide more information.
At least, I decline to change the name of method from bindTo to sync.

The hashcode property is my mistake.
Did you create unit test, of course?
I asked please provide the unit test code you created.
BaseClass is just JS code. You can test only this class on browser, of Node.js.

I did brief testing. This is the most simple event emitter. However I will add unit tests for BaseClass

Test is really important especially for pull request.
In general (I'm not pointting only you),
from the sender a pull request side, if it is accepted, that's all.
But if it has a bug and reproduce is difficult, who has responsibility?
The person who accept the pull request, it is me.
In order to confirm and fix the bug, I need lots of spend time.
Especially you are trying to make a big change.
That's why I ask the proof (such as screen captures of memory usage of Chrome Developer tool and safari inspector), and unit test code.
Unit test has to include two side:

the proof of improvement
and the proof of safe that your change does not affect any current code

Thank you for your preparation.

I know that it's important but I don't see any tests in this repository ;)

I do in my local, but I can not share them. If you send me a more public test, I appreciate for you.

By the way, you should not use the name as Cordova GoogleMaps plugin for iOS and Android (version 3.0).
Because you are not official. Since this plugin adapts the Apache License 2.0, I don't mind if you change the code, and redistribute it, but plugin name is not good.
At least you should change the name.
https://github.com/stalniy/cordova-plugin-googlemaps

And one more by the way.

I just worry about your pull request.
Improve pull request is appreciate.
That's why I open the full source code.

I know but you should understand me as well: I don't want to spend a lot of time doing screenshots and calculating metrics. Better to spend it optimizing code, adding features or tests, real unit tests :)

As I wrote, your code effect or affect the code overall.
Please recognize you are trying to make a big change to this plugin.
I understand you don't want to spend time, but I really worry about your pull request. Because the impact is so big.
That's why I'm asking.
If this pull request improves the performance significantly, I will pay some amount for your work.
This is the correct way of the project donation. (Don't expect too much. The plugin project is poor.)
So what I want to know:

your code is safe or not,
how improve the performance

If you are tired today, you can do later.
I have a high expectation for your work ;)

I got an error with this simple code...
var div = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(div);
map.one(plugin.google.maps.event.MAP_READY, function() {
  var htmlInfoWindow = new plugin.google.maps.HtmlInfoWindow();

  var html = [
    'This is Html InfoWindow',
    '
',
    '<button onclick="javascript:alert(\'clicked!\');">click here</button>',
  ].join("");
  htmlInfoWindow.setContent(html);

  map.addMarker({
    position: {lat: 0, lng: 0},
    draggable: true
  }, function(marker) {

    marker.on(plugin.google.maps.event.MARKER_CLICK, function() {
      htmlInfoWindow.open(marker);
    });
    marker.trigger(plugin.google.maps.event.MARKER_CLICK);

  });
});

at HTMLInfoWindow.trigger (BaseClass.js:64)

at HTMLInfoWindow. (HtmlInfoWindow.js:170)

at HTMLInfoWindow.trigger (BaseClass.js:64)

at HTMLInfoWindow.calculate (HtmlInfoWindow.js:154)

at HTMLInfoWindow.trigger (BaseClass.js:64)

at Map. (HtmlInfoWindow.js:247)

at Map.js:648

at googlemaps-cdv-plugin.js:424

And do not remove the addEventListener, addEventListenerOnce, and removeEventListener methods.
As I wrote, I designed this plugin is similar with the Google Maps JavaScript API v3.
The reason of existing on() and addEventListener() methods are I want to bring down the introduction step wall for beginners.
on() method is really popular, but also some pure JavaScript users prefer addEventListener().
So I decided I provide both, even it is alias.
Did you consider why I provide both methods?
I think I wrote to you before in another thread, please consider why this code is existed.
Keeping backward compatibility is really important for this plugin. Do not change the method name, do not remove methods please.
(Except very early implement, such as the method was implemented just one day ago.)

Since you removed addEventListener(), this code does not work.
map.addEventListener(plugin.google.maps.event.MAP_READY, function() {

});

As you can see, if you think oh, I prefer on() instead of addEventListener(), let's remove it.
Then code is break.
Making a change to BaseClass means you are trying to make very big impact.
That's why I'm asking please make test code.

I checked half of examples of the official demo app
As I tested, mostly fine except HTMLInfoWindow.
I haven't checked performance.
You described your code improve the performance , reduce memory usage.
Please make a proof.
For example, adding 1,000 markers, how many memory the current code, and your code?
Without the proof and fixing the error of HTMLInfoWindow, I can not accept your pull request.
In other word, I will accept you resolve the issue and make the proof.
Then I pay some amount for your work.

fair enough. I will check that use case, add it to unit tests and will update PR. Thanks for the help with testing!
I will add back addEventListener stuff and bindTo

@wf9a5m75 by the way, thanks for suggestion to pay me but I don't need this. Just include my nickname in release notes and this will be enough. Thanks

I found the issue, it can be fixed on BaseClass level but I believe this is HTMLInfoWindow issue  and should be fixed there.
Check https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/multiple_maps/www/HtmlInfoWindow.js#L245
You will find:
self.on(event.INFO_OPEN);

So, the question why is on called without listener? Looks like a bug, am I right?

I used newHtmlInfoWindow.html demo with 1000 markers (you can generate markers using http://www.geomidpoint.com/random/ + regexp find/replace to convert it to JSON).
Timeline for old BaseClass:

Timeline for refactored BaseClass:

As you can see Scripting part for refactored BaseClass is about on 400-500 ms lower.
Hope this is enought to proof that this code is  faster.

Thank you for testing.
I just waked up, so I haven't checked this yet.

I executed 16077 times of new Marker() (not map.addMarker).
This is current code.

And your code.

That's amazing! Almost 60% faster.
(Memory is actually increased though, not too much. So it's ok)

I will test all methods on Android and iOS.
Please wait for a while.

And do you have a paypal account? If no, please tell me the best way to receive some amount for you?
Please send me the information to my e-mail address.

I sent you some amount to your e-mail from my paypal account. Please follow the instruction.
Thank you for improving the cordova-googlemaps-plugin significantly.

it's much easier to work with subscriptions than with callbacks.
Lets imagine that you need to subscribe some function change event and afterwards when component or object is destroyed - unsubscribe it. Then you will do something like this:
class Component {
  constructor(input) {
     this.input = input
     this.changeListener = () => { console.log('changed!') }
     this.input.on('change', this.changeListener)
  }

  onDestroy() {
    this.input.off('change', this.changeListener)
  }
}

You need to store listener function in class instance. It's not very convenient especially when your function is big or just a wrapper for another function (e.g., (event) => { this.isClicked(event.pageX, event.pageY) }).
Instead it's more convenient (and more logically) to store reference to a subscription instance and eventually dispose subscription:
class Component {
  constructor(input) {
     this.input = input
     this.unsubscribe = this.input.on('change', () => { console.log('changed!') })
  }

  onDestroy() {
    this.unsubscribe()
  }
}

Code is cleaner.
Who uses such appoach:

rxjs (used by Angular 2+ and Ionic 2+)
knockoutjs

This is not the way I designed.
Since your code blocks on my way, I can not choose to support Promise,

In order to unsubscribe easily, I provide obj.off(), obj.off("eventName") and obj.off("eventName", callback).
This is enough.

Sorry, but according to Google Trends, rxjs and knockoutjs are not so popular choice.
Past 12 months

https://trends.google.com/trends/explore?q=ionic,rxjs,knockoutjs,cordova
Past 5 years

https://trends.google.com/trends/explore?date=today 5-y&q=ionic,rxjs,knockoutjs,cordova
So if I am forced to choose make a choice, I definitely choose Promise because this is ionic way.
And Promise is almost work on every devices.
(One year ago was different. That's why I did not choose using Promise)

Actually I have to make a choice to support the ionic-native/google-maps wrapper plugin.

How do you want to use Promise?
I agree about knockout, but rxjs became popular when Angular2 was release and Ionic2 is built on top of Angular2.

The problem of the wrapper plugin is which uses then and subscribe.
For example:
this.map.one(GoogleMapsEvent.READY, () => {

   for (let i = 0; i < locations.length; i++) {
     this.map.addMarker(locations[i], this.onMarkerAdded);
   }

});

onMarkerAdded(marker: Marker) {
  marker.on(GoogleMapsEvent.MARKER_CLICK, this.onMarkerClick);
}

onMarkerClick(...params: any[]) {
  let latLng = params[0];
  let marker = params[1];
  marker.showInfoWindow();
}

In order to use write like the above code, on and one have to return the object of the class of the wrapper plugin.
But on and one of the wrapper plugin passes the raw values to the event lister.

Currently, the JS plugin passes the marker instance for all marker events.
It is not written in the document though.
Because ionic does not allow to use this to obtain the caller object of event listener.
Ionic does not allow this way
marker1.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);
marker2.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);

onMarkerClick() => {
  // there is no way to detect which marker called this event listener
}

In order to solve this problem, the plugin passes the instance as the second argument.
(But current ionic wrapper plugin does not receive it though. I'm patching.)
goal
marker1.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);
marker2.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);

onMarkerClick(...params: any[]) => {
  let latLng = params[0];
  let marker = params[1];
}

However, this plugin does not support Promise (browser native) and Observable (rxjs),
the wrapper plugin has to convert the instance type from pure JS to the ionic class,
something like this (this code might not work, just example):
  on(eventName: string): Observable<any> {

    return  new Observable((observer) => {
         this._objectInstance.on(eventName, (...results: any[]) {
           for (let i = 0; i < results.length; i++) {
             if (results[i] instanceof GoogleMaps.getPlugin().BaseClass) {
               results[i] = convertFromJS_to_Ionic(results[i]));
             }
           }
           observer.next.apply(observer, results);
         });
       }
     );
     return obs;
  }

Otherwise, this code would become like this:
marker1.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);
marker2.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);

onMarkerClick(...params: any[]) => {
  let latLng = params[0];
  let marker = params[1];

  // This does not work, because marker is instance of JS, not ionic wrapper's one.
  // marker.one(GoogleMapsEvent.INFO_CLICK).then(() => {
  //   alert("info clicked");
  // });

  // This works, but this leads many people confuse a lot.
  marker.one(GoogleMapsEvent.INFO_CLICK, () => {
    alert("info clicked");
  });
}

So I'm planing to use the Promise and Observable if these both classes are available.
If the JS side supports them, the ionic wrapper plugin does not have to convert the instance.
marker1.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);
marker2.on(GoogleMapsEvent.MARKER_CLICK, onMarkerClick);

onMarkerClick(...params: any[]) => {
  let latLng = params[0];
  let marker = params[1];

  // This code works if the JS side support Promise and Observable, even if the marker instance is JS instance.
  marker.one(GoogleMapsEvent.INFO_CLICK).then(() => {
     alert("info clicked");
  });
}

The ionic wrapper plugin keeps the same method names as the JS plugin.
So you don't need to keep in mind the instance is JS or ionic one.

I need to detect the Observable is available or not, but if the JS plugin supports Promise and Observable both, the benefit is big for ionic users.
And reduce problems for me.
Hence I need to return something:
  on: function(eventName, listener) {
    this[SUBSCRIPTIONS_FIELD][eventName] = this[SUBSCRIPTIONS_FIELD][eventName] || [];
    var topic = this[SUBSCRIPTIONS_FIELD][eventName];
    var index = topic.push(listener);
    var self = this;

    if (checkAvailabilityObservable()) {
       return new Observable(...);
    } else {
       return this;
    }
  },

And you may notice that the JS plugin currently returns their instance of the class.
https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/multiple_maps/www/Marker.js#L231
Marker.prototype.setFlat = function(flat) {
    flat = common.parseBoolean(flat);
    this.set('flat', flat);
    return this;
};
Marker.prototype.setIcon = function(url) {
    if (url && common.isHTMLColorString(url)) {
        url = common.HTMLColor2RGBA(url);
    }
    this.set('icon', url);
    return this;
};

I designed this allows you to use the chain method like jquery.
marker.setTitle("HelloWorld").showInfoWindow();

I forgot to return this in the on method, but I prefer this way.
marker.on(plugin.google.maps.event.MARKER_CLICK, onMarkerClick)
            .on(plugin.google.maps.event.INFO_CLICK, onInfoWndClick);

I understand your point, but as I write previously, this plugin supports three ways obj.off(), obj.off("eventName"), and obj.off("eventName", callback).
You just keep the callback if you want to remove particular event listener.
class Component {
  constructor(input) {
     this.input = input
     this.change = () => { console.log('changed!') };
  }

  onDestroy() {
    this.input.on('change', this.change);
  }
}

or simply just off() or destroy (you added)
class Component {
  constructor(input) {
     this.input = input
     this.change = () => { console.log('changed!') };
  }

  onDestroy() {
    this.input.destroy();
  }
}

And this code create different closures every time.
return function() {
      self.off(eventName, listener);
    };

It means if you create 1,000 markers, this code creates another 1,000 closures.
Did you say this is bad performance, didn't you?

ok, it makes sense


Can't start CW Log node - authentication issues

Hi,
I am having issue just getting the CW Log node to push logs. It seems to be related to an authentication issue and not clear where the issue lies.
Here is what I get when running the sample application:
... logging to /home/ubuntu/.ros/log/db0c15d6-531b-11e9-9e7d-4061864b8ae7/roslaunch-ros-11343.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ros:41131/

SUMMARY
========

PARAMETERS
 * /cloudwatch_logger/aws_client_configuration/connect_timeout_ms: 9000
 * /cloudwatch_logger/aws_client_configuration/max_retries: 10
 * /cloudwatch_logger/aws_client_configuration/region: us-west-2
 * /cloudwatch_logger/aws_client_configuration/request_timeout_ms: 9000
 * /cloudwatch_logger/log_group_name: robot_application...
 * /cloudwatch_logger/log_stream_name: device_name
 * /cloudwatch_logger/min_log_verbosity: DEBUG
 * /cloudwatch_logger/publish_frequency: 5.0
 * /cloudwatch_logger/sub_to_rosout: True
 * /cloudwatch_logger/topics: []
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
NODES
  /
    cloudwatch_logger (cloudwatch_logger/cloudwatch_logger)

auto-starting new master
process[master]: started with pid [11353]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to db0c15d6-531b-11e9-9e7d-4061864b8ae7
process[rosout-1]: started with pid [11366]
started core service [/rosout]
process[cloudwatch_logger-2]: started with pid [11379]
[ INFO] [1553971472.289850374]: [main] Starting cloudwatch_logger...
[ INFO] [1553971472.298896958]: [ReadPublishFrequency] Publish frequency is set to: 5
[ INFO] [1553971472.300726748]: [ReadLogGroup] Log group name is set to: robot_application_name
[ INFO] [1553971472.302639950]: [ReadLogStream] Log stream name is set to: device_name
[ INFO] [1553971472.304349319]: [ReadSubscribeToRosout] Whether to subscribe to rosout_agg topic is set to: 1
[ INFO] [1553971472.305739801]: [ReadMinLogVerbosity] Log verbosity is set to DEBUG.
[ INFO] [1553971472.305873877]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/config and using profilePrefix = 1
[ INFO] [1553971472.305916400]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/credentials and using profilePrefix = 0
[ INFO] [1553971472.305970677]: [ProfileConfigFileAWSCredentialsProvider] Setting provider to read credentials from /home/ubuntu//.aws/credentials for credentials file and /home/ubuntu//.aws/config for the config file , for use with profile
 default
[ INFO] [1553971472.306014492]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/config and using profilePrefix = 1
[ INFO] [1553971472.306174145]: [Aws::Config::AWSProfileConfigLoader] Successfully reloaded configuration.
[ INFO] [1553971472.306257575]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/credentials and using profilePrefix = 0
[ INFO] [1553971472.306334625]: [Aws::Config::AWSProfileConfigLoader] Successfully reloaded configuration.
[ INFO] [1553971472.340198505]: [CurlHttpClient] Initializing Curl library
[ INFO] [1553971472.343481810]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/config and using profilePrefix = 1
[ INFO] [1553971472.343534508]: [Aws::Config::AWSConfigFileProfileConfigLoader] Initializing config loader against fileName /home/ubuntu//.aws/credentials and using profilePrefix = 0
[ INFO] [1553971472.343584441]: [ProfileConfigFileAWSCredentialsProvider] Setting provider to read credentials from /home/ubuntu//.aws/credentials for credentials file and /home/ubuntu//.aws/config for the config file , for use with profile
 default
[ INFO] [1553971472.343634195]: [EC2MetadataClient] Creating HttpClient with max connections2 and scheme http
[ INFO] [1553971472.343683503]: [CurlHandleContainer] Initializing CurlHandleContainer with size 2
[ INFO] [1553971472.343728052]: [InstanceProfileCredentialsProvider] Creating Instance with default EC2MetadataClient and refresh rate 300000
[ INFO] [1553971472.343760221]: [DefaultAWSCredentialsProviderChain] Added EC2 metadata service credentials provider to the provider chain.
[ INFO] [1553971472.343878271]: [Aws::Config::AWSProfileConfigLoader] Successfully reloaded configuration.
[ INFO] [1553971472.343917604]: [InstanceProfileCredentialsProvider] Credentials have expired attempting to repull from EC2 Metadata Service.
[ INFO] [1553971472.344109841]: [CurlHandleContainer] Pool grown by 2
[ INFO] [1553971472.344138121]: [CurlHandleContainer] Connection has been released. Continuing.
[ERROR] [1553971473.344781421]: [CurlHttpClient] Curl returned error code 28
[ERROR] [1553971473.344997725]: [EC2MetadataClient] Http request to retrieve credentials failed.
[ INFO] [1553971473.345083534]: [Aws::Config::AWSProfileConfigLoader] Failed to reload configuration.
[ INFO] [1553971473.345322229]: [CurlHandleContainer] Initializing CurlHandleContainer with size 25
[ INFO] [1553971473.345643092]: [StartPublisherThread] Started publisher thread
[ INFO] [1553971473.346427372]: [CurlHandleContainer] Pool grown by 2
[ INFO] [1553971473.346538664]: [CurlHandleContainer] Connection has been released. Continuing.
[ INFO] [1553971473.355820614]: [ReadSubscriberList] Subscribing to rosout_agg
[ INFO] [1553971473.355869571]: [main] Initialized cloudwatch_logger.
[ WARN] [1553971473.742467271]: [AWSErrorMarshaller] Encountered AWSError 'MissingAuthenticationTokenException': Missing Authentication Token
[ERROR] [1553971473.742719541]: [AWSClient] HTTP response code: 400
Exception name: MissingAuthenticationTokenException
Error message: Missing Authentication Token
5 response headers:
connection : close
content-length : 89
content-type : application/x-amz-json-1.1
date : Sat, 30 Mar 2019 18:44:32 GMT
x-amzn-requestid : dc478dc5-531b-11e9-8d7d-df38900c1a74
[ WARN] [1553971473.742868071]: [AWSClient] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[ WARN] [1553971473.743092549]: [CheckLogGroupExists] Request to check if log group named robot_application_name exists failed. Error message: Missing Authentication Token, with error code: 8
[ INFO] [1553971473.743350965]: [CurlHandleContainer] Connection has been released. Continuing.
[ WARN] [1553971474.074042260]: [AWSErrorMarshaller] Encountered AWSError 'MissingAuthenticationTokenException': Missing Authentication Token
[ERROR] [1553971474.074265678]: [AWSClient] HTTP response code: 400
Exception name: MissingAuthenticationTokenException
Error message: Missing Authentication Token
5 response headers:
connection : close
content-length : 89
content-type : application/x-amz-json-1.1
date : Sat, 30 Mar 2019 18:44:33 GMT
x-amzn-requestid : dc7a5e57-531b-11e9-8e3b-df68653f3e8a
[ WARN] [1553971474.074420090]: [AWSClient] If the signature check failed. This could be because of a time skew. Attempting to adjust the signer.
[ERROR] [1553971474.074620496]: [CreateLogGroup] Failed to create Log Group :robot_application_name due to: Missing Authentication Token, with error code: 8
[ERROR] [1553971474.074699993]: [Run] Failed to create log group, retrying ...
[ INFO] [1553971474.074884171]: [CurlHandleContainer] Connection has been released. Continuing.
[ WARN] [1553971474.409767874]: [AWSErrorMarshaller] Encountered AWSError 'MissingAuthenticationTokenException': Missing Authentication Token
[ERROR] [1553971474.409960100]: [AWSClient] HTTP response code: 400
Exception name: MissingAuthenticationTokenException
Error message: Missing Authentication Token
5 response headers:
connection : close
content-length : 89
content-type : application/x-amz-json-1.1
date : Sat, 30 Mar 2019 18:44:33 GMT
x-amzn-requestid : dcad545e-531b-11e9-9df6-01f20a4e62a5

Thinking this was related to a misconfigured IAM policy I am able to create a log group with no issues.
$ aws logs create-log-group --log-group-name testdeleteme

AWS Credential Files
#robomaker
[default]
region = us-east-1

$ cat ~/.aws/credentials
#aws robomaker creds
[default]
aws_access_key_id = XXX
aws_secret_access_key = XXX

System time is also synchronized
$ timedatectl status
      Local time: Sat 2019-03-30 13:48:19 CDT
  Universal time: Sat 2019-03-30 18:48:19 UTC
        RTC time: Sat 2019-03-30 18:48:20
       Time zone: America/Chicago (CDT, -0500)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

Version
$ aptitude show ros-kinetic-cloudwatch-logger
Package: ros-kinetic-cloudwatch-logger
State: installed
Automatically installed: no
Version: 1.0.0-0xenial-20190325-063824-0800
Priority: extra
Section: misc
Maintainer: AWS RoboMaker<EMAIL_ADDRESS>Architecture: amd64
Uncompressed Size: 132 k
Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2), ros-kinetic-aws-common,
         ros-kinetic-aws-ros1-common, ros-kinetic-cloudwatch-logs-common, ros-kinetic-roscpp
Conflicts: ros-kinetic-cloudwatch-logger:i386
Description: CloudWatch Logger node for publishing logs to AWS CloudWatch Logs

Homepage: http://wiki.ros.org/cloudwatch_logger

Hi, thank you for the detailed information.

Please make sure that the user running the ROS application has permissions to read the ~/.aws/credentials file; I was able to reproduce this issue by running chmod 000 ~/.aws/credentials.

Alternatively, setting the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY for the shell that launches the node should be equivalent.

If neither help - could it be that you are using temporary credentials? When using temporary credentials, the session token should also be set.

Lastly, please note that the region defined in the launch configuration file overrides the value in ~/.aws/config, as you can see in the log you pasted:
/cloudwatch_logger/aws_client_configuration/region: us-west-2
So you'll need to make sure the IAM user has permissions to CloudWatch Logs in that region (and/or change the region to match the one you intended to use).

If all else fails, try the latest cloudwatch-logger which uses a more up to date set of dependencies (in particular, the AWS SDK). It can be fetched from the ros-shadow-fixed apt repository (see http://wiki.ros.org/ShadowRepository). In this case apt show ros-kinetic-cloudwatch-logger should display version 2.0.0.

The region setting was the heart of the problem. And it helps closely to read the docs. Checking the output from the working copy, once I corrected the sample config file, I get the output:
PARAMETERS
 * /cloudwatch_logger/aws_client_configuration/connect_timeout_ms: 9000
 * /cloudwatch_logger/aws_client_configuration/max_retries: 10
 * /cloudwatch_logger/aws_client_configuration/region: us-east-1
 * /cloudwatch_logger/aws_client_configuration/request_timeout_ms: 9000
 * /cloudwatch_logger/log_group_name: robot_application...
 * /cloudwatch_logger/log_stream_name: device_name
 * /cloudwatch_logger/min_log_verbosity: DEBUG
 * /cloudwatch_logger/publish_frequency: 5.0
 * /cloudwatch_logger/sub_to_rosout: True
 * /cloudwatch_logger/topics: []
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

Which looked different from my setup.
  <node name="cloud_logger" pkg="cloudwatch_logger" type="cloudwatch_logger">
    <param  name="sub_to_rosout" value="true" />
    <param  name="log_group_name" value="test" />
    <param  name="log_stream_name" value="sample1" />
    <param  name="publish_frequency" value="5" />
    <param  name="min_log_verbosity" value="DEBUG" />
    <param  name="aws_client_configuration" value="us-east-1" />
  </node>

The issue was the region wasn't set correctly to aws_client_configuration/region as mentioned in the docs.


Hi, could we PLEASE get a larger health bar?  The current one is too short

The problem is that I like to PvP and knowing what your health is, as exactly as possible, is important.
This is why I would LOVE to have a longer health bar, so it's easier to see how much hp I have
Numbers over the current health bar would also be amazing

Thank you!

You're welcome

The healthbar above the player is limited, since the values used for it aren't representative of the actual health values; this is a Jagex limitation. A wider health bar would not make it more granular. Status Bars or the hp orb are much better ways of showing this.