Consider using a babel plugin to remove proptypes for production build

Instead of using if (process.env.NODE_ENV !== "production") {  you can use stuff like https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types.
Pros: simpler code, no process env check
Cons: Can't be handled by you, you must tell people to handle this by themselves (because you must leave them for development, and you don't handle production optimization).
This can be considered as a good argument since using this plugin will optimize all react components you use, not just react-jsonschema-form. But this will need some docs :)

Can't be handled by you, you must tell people to handle this by themselves

So that doubles the amount of installation steps needed by end users right? Is that really worth it?

This plugin now supports a wrap mode for libraries author, basically, it's reproducing the same if (process.env.NODE_ENV !== "production") { pattern we can see at the build time.

@MoOx if you are still interested in implementing this, feel free to send a PR.


some kind of TCL error i cant seem to figure out

Hi, can i get any help with this? i tried some random stuff to fix it but nonthing helped

Hello,
Was this picture taken from the development pre-release executable, or you've tried to build the executable yourself?

Hi, i tried building it myself using the guide  u got, it worked normally before i reinstalled my computer, so i am stuck here. I did not use the release due it being 2023 dated

What version of python are you running?

Hi, my python is on 3.13,I have tried reinstalling python but no luck
---------- Původní e-mail ----------
Od: DevilXD @.>
Komu: DevilXD/TwitchDropsMiner @.>
Datum: 09.11.2024 16:31:27
Předmět: Re: [DevilXD/TwitchDropsMiner] some kind of TCL error i cant seem
to figure out (Issue #605)
"
Make sure that you're using at least Python 3.10. Everything else should
work as expected, setting up the virtual environment in the env folder, then
building with pyinstaller from there. Alternatively, you can use the pre-
release development build from the releases page - not the "latest" release,
because that one is indeed outdated and not stable anymore.
—
Reply to this email directly, view it on GitHub
(https://github.com/DevilXD/TwitchDropsMiner/issues/605#issuecomment-2466258582)
, or unsubscribe
(https://github.com/notifications/unsubscribe-auth/BJ4ZFEYRRX7M5IUCEHP7UZDZ7YTERAVCNFSM6AAAAABRO7BNZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWGI2TQNJYGI)
.
You are receiving this because you authored the thread. Message ID: <
@.***>
"

Well, as explained in #581, 3.13.0 specifically currently has a bug, that will prevent the miner from working. This is a bug with Python itself, not the miner, so there's nothing I can do here. Reinstall and use Python 3.12.7 instead.


{"code":"UNIMPLEMENTED"}

Hello,
I have applied your package, however I am getting this error
⚡ [error] - {"code":"UNIMPLEMENTED"}
my code is
`
let options:SignInWithAppleOptions = {
clientId: 'com.oplusstodio.cortado',
redirectURI: 'https://xxxxxx.firebaseapp.com/__/auth/handler',
scopes: 'email',
state: '12345',
nonce:"nonce"
};
SignInWithApple.authorize(options)
      .then(async (res:SignInWithAppleResponse)=>{
        console.log(res)

        if (res.response && res.response.identityToken) {
        console.log(res)
        console.log(res.response)
    //    this.appAlertService.showAlert(JSON.stringify(res.response))
        }
      })
         .catch((response) => {
    console.log(response)
    //this.presentAlert();
  });

`
I am really confuse, what could be the error... since it dose not tell much

I do not see that exact same error, but I am seeing "The operation couldn't be completed. (com.apple.AuthenticationServices.AuthorizationError 1000)."
On my iOS device, I am unable to enable to even see the initial Apple interface popup. I have a new Ionic project using Capacitor v8.19.3. I've configured all the profiles, identifiers, etc. on the Apple side (I have been using cordova Sign in with Apple with the same clientId for a few years already).
I've installed the plugin and my code is basically the same as @hallbird and the sample code on the readme page, with the exception that I have redirectURI: '' as I do not care about the web, just iOS (I've tried entering a value here too, but no luck).
Although it states this is for v4 Capacitor, is it correct to assume this will work with v8?
Does anyone know if I've overlooked something needed to get this to work?

I think ... there is an issue ... since Apple login was working fine until an update to the new iOS 16.2 ... it got failed

@hallbird I finally got it working. Here's the steps I took, hopefully it will help and save some time for other devs needing this plugin.
I started with the brand new ionic capacitor template tabs project (Capactor v8.19.3). I added iOS and Android then built using 'npm run build' then ran the app locally with 'ionic serve' on localhost:8100. I installed the apple-sign-in plugin as seen in the readme.
Over on Apple (developer.apple.com), I created the necessary certificates, identifiers, etc. making sure the identifier had 'Sign in with Apple' selected (enabled as primary AppID).
I opened my app in xcode (pointing to the /ios/app/app location) and in the UI with the first App folder selected on the left, clicked the Signing & Capabilities tab and completed the Signing form (team & bundle id). Then using the +Capability button added Sign in with Apple. This created an App.entitlements file. Without this the plug will not work. This is the step I did not know about and the reason for my initial post in this thread.
Back in my sample tabs project, I added a button to call the Authorize method of the plugin as seen in the readme page.
I had already updated my phone and ipad to iOS 16.3 so not sure if this would have failed in 16.2.

Hi,
Still struggle ... I have App.entitlements
image : https://ibb.co/kcykx6B
I have delete the configuration in Apple developer and add it again and still the same...
the challenge is no clear error ... which makes this hard to catch ...
I hope some face this issue before and support and us

@hallbird maybe try the steps I outlined above by creating a brand new capacitor application. That was the only way I could be certain of each step and if followed correctly the plugin has to work, at least the user interface should appear. I am not sure about the firebase backend as I didn't use that, instead connecting to our own node server hosted on heroku.

I am experiencing the same issue as well. I am getting the {"code":"UNIMPLEMENTED"} error.
During the configuration of the App ID, I checked the "Enable as a primary App ID" option, and it includes the "Sign In with Apple" capability. Similarly, I activated the relevant capabilities in Xcode.
I am wondering if the RedirectURI might be entered incorrectly. During the bundle creation process for the app, it didn't request a RedirectURI for Apple Login authorization. Therefore, in my JS code, I tried almost everything possible for this field, but none of them resulted in success.
I have tested the integration on the browser, emulator, and mobile device. I also tried using TestFlight, but it still doesn't work.
iOS: 16.5.1
Xcode: 14.3.1

Same here! getting {"code":"UNIMPLEMENTED"}
Capacitor 5 on Native ios device version 17.0.2

Hi ,
I was struggling for days with the same problem, and this was my solution.
While reviewing the project generated for IOS, I discovered that the source files for the library had fewer lines of code than in anther project where the library was working correctly( I created a new one from scratch just to test the library). Upon discovering this, I deleted the packages(node modules), reinstalled them, and then synchronized with Capacitor using the respective command.
Once I did this, the source files had the same number of lines, and the flow ran correctly (tested in simulator with one of latest IOS version and physical device Iphone 15).
I hope this solution will be helpful to the community.

@robingenz i am getting this error after i migrated to v6.0.0.
Error: "SignInWithApple" plugin is not implemented on ios

@tolutronics Please follow the Capacitor iOS troubleshooting guide in this case.

@robingenz i am getting this error after i migrated to v6.0.0. Error: "SignInWithApple" plugin is not implemented on ios

Have you been able to solve it? Because I have the same problem. I followed the capacitor iOS troubleshooting guide, but nothing helped.


404 - Not found

Running via docker, container starts, on trying to navigate to the localhost
Creating JSON store at /datastore
(1) wsgi starting up on http://<IP_ADDRESS>:5500
(1) accepted ('<IP_ADDRESS>', 62247)

Request failed: 404 Client Error: Not Found for url: https://disneyworld.disney.go.com/dining/

<IP_ADDRESS> - - [29/Jul/2022 18:01:08] "GET / HTTP/1.1" 200 0 0.175413
wsgi exiting
(1) wsgi exited, is_accepting=True
Seems they've modified URL, I am unsure if they made any other breaking changes.

Same issue for me. Any updates on a fix? I haven't yet been able to use but looks awesome.

Really appreciate the quick response here -- I empathize with the lack of time.  I'll continue to keep on eye out. Have my son's 10th birthday coming up middle of next month and was just trying to score a decent reservation for him to celebrate.

I spent some time on it last night and was able to get the latest retrieval method working, now just need to format it back how the program is expecting it.  Hopefully should have an updated version this week.

Fantastic news !

Amazing!!

Pushed a new version out if you want to give it a try.

Just pulled new docker image and it looks good so far. Thank you so much!
On Tue, Sep 20, 2022 at 12:39 PM ChuckMac @.***> wrote:

Pushed a new version out if you want to give it a try.
—
Reply to this email directly, view it on GitHub
https://github.com/ChuckMac/ADRFinder/issues/8#issuecomment-1252691656,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGSP2AIGYRCS3DIBZZ2RFTV7HZGDANCNFSM55CL2TWA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hello.  First...thanks for putting all this work into this app.  I stumbled across it a week ago and am a total newbie.  I have managed to configure the GUI to my liking and am getting errors in the log saying: Request failed, Non-200 received getting reservation data: 400 when I launch the site.  The last checked is stuck on "Checking Now".  I'm wondering if I need to configure my disney account info somewhere in the code to allow for searching or if this is another issue?  Thanks in advance for any guidance.
Watching: 7532f755-ceb4-4f9e-b91e-40611e4cfb54 90001369;entityType=restaurant
Watching: b1eaf779-0e1f-4777-945a-b468da6db0dd 18733814;entityType=restaurant
Watching: 1969dd27-3449-41fc-b265-c573a7b3cfe8 90002448;entityType=restaurant
(1) wsgi starting up on http://<IP_ADDRESS>:5500

Request failed, Non-200 received getting reservation data: 400
Request failed, Non-200 received getting reservation data: 400
Request failed, Non-200 received getting reservation data: 400

@mybig731 your account information is not required anywhere for the process.  I'll see if i can recreate that 400 error.

I setup two scans and forced a check and am seeing "Remote end connection
closed without response"
On Tue, Sep 20, 2022 at 2:50 PM ChuckMac @.***> wrote:

@mybig731 https://github.com/mybig731 your account information is not
required anywhere for the process. I'll see if i can recreate that 400
error.
—
Reply to this email directly, view it on GitHub
https://github.com/ChuckMac/ADRFinder/issues/8#issuecomment-1252832688,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGSP2C42D43VB3L4FEEGJTV7IIQ7ANCNFSM55CL2TWA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Same here. "Remote end closed connection without response"
Log says: "Request failed, Non-200 received getting reservation data: 400"

I pushed a new update (0.2.1) give that one a try.

I actually am still getting it on .2.1  I ran a test to add the rest of the
ones I'm missing still and they're all failing with the same error.
On Tue, Sep 20, 2022 at 6:13 PM ChuckMac @.***> wrote:

I pushed a new update (0.2.1) give that one a try.
—
Reply to this email directly, view it on GitHub
https://github.com/ChuckMac/ADRFinder/issues/8#issuecomment-1253007120,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGSP2BKBESPDNN2LNHHEC3V7JAIXANCNFSM55CL2TWA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I don't see the errors any more. But I have 4 restaurants selected, one of which I know has openings on the date I selected. I checked it in the mobile app. They're all sitting with Last Checked as "checking now..."

Pushing one more update tonight... looks like the search is different depending on if its a timeframe (ex: Breakfast) vs a set time (ex: 11:00).  0.2.2 but the build process to docker takes ~45 minutes.

Appears to be working well since last update.  Seeing failures still randomly, but I assume it's some kind of throttling and not the same issue as before.

Flawless here. MANY THANKS!!

Same here working wonderfully.  I really appreciate the effort!

great I'm going to close this one out

Never mind new version fixes that. Didn't notice
Thank you for your work on this fantastic app
On Tue, Sep 20, 2022 at 5:21 PM Kevin Weitzner @.***>
wrote:

I setup two scans and forced a check and am seeing "Remote end connection
closed without response"
On Tue, Sep 20, 2022 at 2:50 PM ChuckMac @.***> wrote:

@mybig731 https://github.com/mybig731 your account information is not
required anywhere for the process. I'll see if i can recreate that 400
error.
—
Reply to this email directly, view it on GitHub
https://github.com/ChuckMac/ADRFinder/issues/8#issuecomment-1252832688,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGSP2C42D43VB3L4FEEGJTV7IIQ7ANCNFSM55CL2TWA
.
You are receiving this because you authored the thread.Message ID:
@.***>


Refactor to move all ci related files to ci/

What do these changes do?
Refactor to clean up root directory by moving ci related files to ./ci/
Related issue number

[x] passes flake8 modin
[x] passes black --check modin
[ ] tests added and passing

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Modin-PRB/547/
Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Modin-PRB/548/
Test FAILed.

Merged build finished. Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Modin-PRB/549/
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Modin-PRB/567/
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Modin-PRB/638/
Test FAILed.


[HPC] [NWays] Optimization for N-Ways with Nsight Compute

Currently, the lab N-Ways covers the only introduction to OpenACC, OpenMP, CUDA, and ISO standards using Nsight System.
This feature request is to create material on optimization techniques with help of Nsight Compute for the above-given different methods

[x] Optimization for OpenACC
[x] Optimization for OpenMP
[ ] Optimization CUDA

Pull request #63 merged - this solves issue #17 (1 and 2)

Closing the issue with OpenACC and OpenMP optimization. A new issue will be created to incorporate the cuda and restructuring for Nsight Compute.


fix: find trigger in another shadow root

Alaska Airlines Pull Request
Fixes #29
Summary:
This PR allows the popover to be placed inside another shadow root. This is needed due to a regression introduced by https://github.com/AlaskaAirlines/auro-popover/pull/13/commits/c3cec834804e103513df285b5ca2b6d5d0be7acf.
If the trigger can be queried from the document, we use that. Otherwise, we get the shadow root using getRootNode and query there.
Type of change:
Please delete options that are not relevant.

[x] Revision of an existing capability

Checklist:

[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team

Heading out on PTO, so I won't be able to respond to PR feedback until 7/19. @jason-capsule42 / @Dayna-A, feel free to make any changes necessary to get this merged.

:tada: This PR is included in version 2.1.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


How to select the same file twice in a row?

First, thank you for making this, it's a very helpful tool.
I'm trying to handle the case where a user:

selects a file, say "abc.txt"
does some other things in the app
selects the same file, "abc.txt"

The second time the same file is selected, the onChange() handler does not fire. This does make sense, because the file technically has not changed.
But is there any way to "reset" the input, so that the same file will trigger some sort of event that I can handle?
I have setting a ref: <FileInput ref="myFile" ... /> followed by calling  this.refs.myFile.state.value = ''; in the onChange function. This clears the string value in the input field, but it does not "reset" the component.

I had the same issue, and decided I'd just completely re-render the component before selecting the same file again. As the underlying input component does not recognize the file has changed, this might be the best we can do with this.
Here's how I'm doing the reset
http://stackoverflow.com/questions/21749798/how-can-i-reset-a-react-component-including-all-transitively-reachable-state

@silversoup
Thanks! I got it to work by calling:
this.refs.myFile.replaceState(this.refs.myFile.getInitialState());

A little wordy but works.


Feature request: Disable automatically syncs model data for all models

Hi @ all
I'am working in a big project. Some developer don't work with elasticsearch. And our continuous integration - test process has not elasticsearch installed yet.
So me need to disable global all snycs in model.
My workaround:
    public $syncDocument;

    public function __construct(array $attributes = [])
    {
        $this->syncDocument = config('arena.elasticsearch_enable');
        parent::__construct($attributes);
    }

Has any a idea?

@approached did you come out with a solution ?

@sleimanx2 I think this issue should be solved.We are facing same.

Not anymore interested for this package.

@approached , did you find any better package for continuing on?

I have my own script. But in next time i will try this: https://github.com/ErickTamayo/laravel-scout-elastic


Progress upload

How to upload a file progress and get the percentage

Given #500, this can probably be closed.

Is there a tracking issue for file upload support to be added back? Feels kinda half-baked without this


FGA clicks 'close' button instead of 'repeat' button after finishing free quest(KR server, Galaxy tab S7+)

Preparation

[X] I tested the latest release
[X] I looked at other issues (even the closed ones)
[X] I read the Troubleshooting Guide

FGO server
KR
FGA build number
2469
Describe the bug
I have Galaxy S23 and Galaxy S7+, and I tested both to check this.
Before FGO KR server update in January 31, both S23 and S7+ worked normally.
FGA clicks 'repeat' button to continue farming when it finishes free quest.
Since the update, there has been a problem with FGA on S7+.
On S7+, FGA clicks the 'close' button, select the free quest again, and then use the apple.(if it has to)
On the other hand, S23 uses the apple immediately after pressing the 'repeat' button normally.
This occurs regardless of the type of apple.(Gold, silver, bronze, blue)
I reinstalled the FGA of the S7+, but the same problem occurred.
I know this is not game breaking thing, but it takes more time when farming.
If this is a bug, I want to know if it is a fixable problem.
Video
none, android 13
Device model
Galaxy tab S7+
Android version
13
Screen size
2800x1752
RAM
12GB

I'll need a video with debug mode to be able to find the issue.
Here's a guide on how to record FGA on Android 13 with a PC: https://youtu.be/iIjZPjDcZeM


Override SES client region with an optional property and a SimpleDB fix

Override SES client region with an optional property and a SimpleDB fix for dashes in names.
Addresses PR #177 and PR #142.

SimianArmy-pull-requests #191 SUCCESS
This pull request looks good

NetflixOSS » SimianArmy » SimianArmy-pull-requests #19 SUCCESS
This pull request looks good


C++ STL : Vectors

Description 📜
C++ STL (Standard Template Library) is very important part of C++ .vector is subdomain of C++ STL.
I will be working upon video on Vectors in C++.

Domain of Contribution 📊

[x] C/CPP

/assign

I can write a well-formatted and structured documentation on the topic. May I do this?
Batch - 4
Documentation

I can write well-formatted and structured documentation on the topic. May I do this?
Batch - 4
Documentation

I can write well-formatted and structured documentation on the topic. May I do this?
Batch - 4
Documentation

please make your own issues

/assign

/assign


How to capture disconnection of a peer

Hi,
I am trying to capture the case when one of the peer left the call. I have successfully started a call between Hololens 2 and unity editor. Video and audio streaming for both parts are also ok. Now, I want to manage call sessions and for that I need an event that is triggered when a peer left the call, so that I can give feedback to the other peer. I have searched through the codes but could not find such an event in the Microsoft.MixedReality.WebRTC.Unity library. Am I missing something or do I need to create such a event myself? I would be appreciated for any help. Thanks in advance.

Did you try PeerConnection.IceStateChanged? I think that this is the proper way, although I have to admit I am not 100% sure. We're exposing the underlying native API on that one and I never really understood fully the closing sequence of WebRTC at the protocol level (because that version of Google's API is not 100% conformant to the standard).

PeerConnection.IceStateChanged worked as expected. Thanks


Govalidator not installable due to Gopkg issues

When installing the dependency gopkg.in/asaskevich/govalidator.v4 the following error occurs.
error: RPC failed; HTTP 301 curl 22 The requested URL returned error: 301
fatal: The remote end hung up unexpectedly
package gopkg.in/asaskevich/govalidator.v4: exit status 128

This is because git no longer follows redirects https://github.com/niemeyer/gopkg/issues/50
There hasn't been any updates from the Gopkg author on the issue for a while. I would recommend to usegithub.com/asaskevich/govalidator so that this library is installable out of the box.

This makes perfect sense. It also makes using dependency management tools (e.g. glide, godep) much easier. Thanks!

No need to change the configuration anymore. We've changed gopkg.in itself to support the new git quirks.


Wrapping Dexie methods in its promise implementation without getting setTimeout being triggered

Hello again, this one is driving me crazy.
I'm wrapping some methods around the ones of your library in my application (which is based on the angular framework, so I took care of using your Promise implementation instead of $q until the very end of the chain, when transactions are already committed).
Problem is that I don't seem to be able to create a Promise of yours without having setTimeOut being called, breaking the nested transaction chain I'm trying to build with my wrappers.
I'll make a  (stupid) example:
this.getNodesToBeListed = function(ids) {
        var nodes = [];
        if (angular.isArray(ids) && (ids.length) > 0) {
// Transaction kinda irrelevant in this case, but let's pretend it's not
            return db.transaction('r', db.node, function () {
                // is it better to use .each instead of then?
                db.node.where(':id').anyOf(ids).toArray().then(function (res) {
                    if (angular.isArray(res)) {
                        angular.forEach(res, function (dbNode) {
                            var node = nodeService.buildFromDbData(dbNode);
                            if (node.isDraft()) {
                                nodes.push(node);
                            }
                        });
                    }
                });
                return nodes;
            });
        } else {
            // Trying to return a promise resolving to an empty array, but in fact I could return some more elaborated thing
            return Dexie.Promise.resolve(nodes);
        }
    };

Then I'd like to chain this method to another via dbservice.getNodesToBeListed(ids).then(...) and so on, all inside in a parent transaction.
The problem arise on the Dexie.Promise.resolve(nodes) which doesn't seem the correct way to do it.
I also tried a not so elegant:
new window.Dexie.Promise(function(resolve, reject) {
            resolve(nodes);
});

But it seems to still trigger the setTimeout.
Sorry if I'm being clueless here, the fact is that in angular I'm probably used to a different implementation where I would simply use a return $q.when(nodes) and save the day...
This problem of getting a resolved Promise without triggering setTimeOut and the subsequent indexedDB commit also applies to dynamic chains (in fact, that's the place where I discovered the issue, only to find it applied everywhere in my code).
(with dynamic chain I mean something that programmatically builds a sequential chain of promises, based on an array.reduce for example)
Is the thing I'm trying to do accomplisheable with your implementation of Promise?
I suspect it is and it's just me not figuring out the proper way...
Thanks a lot, I hope my question was clear enough and I didn't forget something...
EDIT: I'm assuming I'm doing it the wrong way as my transactions get aborted with the message "already closed transaction" and after adding some console.log in the Dexie source near the setTimeOut(s) (including asap) I see it triggered and I thought that was the issue... But maybe it's something that happens normally and it's in a place where it wouldn't distrupt the transaction, and I'm using correctly Dexie.Promise.resolve() to get a newly resolved promise?

Reason it calls setTimeout when doing executing a promise at 'root' level is to be guarantee being fully Promise A+ compliant. Internally this would generate issues with the indexedDB transactions because they can commit, so I use Dexie.Promise._rootExec() internally that will, at end call all callbacks instead of sending them to setTimeout().
To make sure setTimeout() is never called, make sure the root of your call stack is executed by
Dexie.Promise.resolve().then(function(){
    // Do your calls here.
});

In your case, there are several ways to make sure to prohibit setTimeout() from being called. One is to use Dexie.Promise.resolve() at the start of the entire chain. Another way is to use Dexie.Promise._rootExec() at that same level.
// Code calling getNodesToBeListed():

Dexie.Promise.resolve().then(function (){
    return x.getNodesToBeListed (ids);
}).then(function (nodes) {
   // the nodes come here
});

Note however, that setTimeout() will be called before the initial then() is called, but after that no more within the chain. If this is a problem, you could use Dexie.Promise._rootExec() yourself and callbacks will fire directly before call is returned.

// Code calling getNodesToBeListed():

Dexie.Promise._rootExec(function (){
    return x.getNodesToBeListed (ids).then(function(nodes) {
         // ...
    });
});

I am curious about what problems does setTimeout() cause you? I'm not so familiar with angular but has it to do with rendering stuff in angular?

Hello, thank for you answer and sorry for my late reply, got back to my PC just now to test what you described above.
First, about the Angular part, it's not causing issues with that, at least I think I managed to sort that out. Basically, Angular implementation of promises afaik DO use setTimeout (as it was also noted in another post here about using a generalized Promise implementation) to integrate it in its $digest service which takes care of DOM updating. I managed to work around that by using your Promise implementation and just wrap them in Angular ones at the end of the chain in a layer closer to the application Controller, manually calling the $apply function of Angular to update the DOM (which, as far as I know, it's more efficient than having it update on every step of the chain).
Problem is that I tried to use _rootExec but unfortunately that doesn't solve my issue.
Basically I have several methods that wrap around the DB calls.
Each of these methods normally uses a transaction to ensure atomicity of the operations included in itself.
I wrote all of these methods to return a promise with the result contained into it, to chain them togheter. The value in the promise is often the result of a calculation/transformation of the retrieved/inserted DB values (hence the need to wrap the static calculated/transformed result retrieved into a new promise with something like Dexie.Promise.resolve(values) or your proposed _rootExec).
When I chain the above methods, I'd like to wrap them all into a parent transaction.
I tried the _rootExec solution (as using .resolve at the start of the chain is not what I needed, I need it at the end of each single method I chain up to build the parent transaction) but I found out that its return value isn't a Promise (i.e. doesn't have a .then method I could use to chain the result into another method of the bigger chain), leading to same issue as before. Using _rootExec to return a freshly built Promise wouldn't ofc solve the problem as it would give same initial issue.
If I'm not completely misleaded (note: I'm not exluding I'm missing the point somewhere :-), there are a couple ways I could cope with this situation:

Rewrite each bigger, parent transaction to be a single method with all code contained in itself (kinda suck as it would lead to code duplication) to avoid the use of Promise.resolve().

Give up on using transaction on the big parent promise and either live the rest of my life with finger crossed OR write some rollback code at application level, which could fail too and lead data in inconsistent state...

Extend the Promise class (maybe breaking A+ compatibility?) and create a Promise.staticResolve method which would return a statically resolved promise with supplied value without calling setTimeout. I took a quick glance at Bluebird promise implementation and I think I saw something along those lines.

Question is: do you think it's feasible and reasonable to implement point 3? Would that bring along some issues? Is there something special I need to take into account? I'm particularly worried about the PSD part which takes care of carrying transaction data.
Thank you again for any advice on the matter!

Wow you are really utilizing the cool parts :)
So if I understand you correct, you may do something like:

db.transaction('rw', db.table, function() {
    return lowerLevelFn();
}).then(function (result) {
    updateViewWithResult(result);
});

function lowerLevelFn() {
    if (x) {
        return db.transaction('rw', db.table, function () {
            // do something in this sub transaction and return a result
        });
    } else {
        return Dexie.Promise.resolve(y); // return result directly
    }
}

If so, it is a bug if it doesnt work. Dexie.Promise.resolve() MUST, when being called from within a parent transaction, NOT do setTimeout() to resolve itself. Only if it was called directly.
I feel I really want to understand the issue and create a unit test that reproduce it and resolve the bug.

You wrote a cool lib, I'm doing my best to use the cool parts ;-)
That being said, I don't want to exclude I'm doing something wrong. I'm in the middle of a migration from a synchronized localStorage api to the indexedDb one with Dexie, lots of stuff to do so actually something could be messing things up if you say that setTimeout shouldn't be called in that context!
Give me a few mins and I'll try at least to set up a barebone JSfiddle to test the issue outside the rest of the app (I think I tried already, but better be safe than sorry), I'll let you know the results asap and in case post the link.

Tried to reproduce your scenario in a unit test. Failed though to reproduce it. Unit test source (the last test in the file).
You can play it here: https://rawgit.com/dfahlander/Dexie.js/master/test/run-unit-tests.html?module=transaction&testNumber=104

If possible to trigger the issue, it would be great to have that unit test modified so that I have something to play with ;)

Hi David,
after JSfiddling for more than a couple of hours (so far for a "couple of mins", lol) maybe I found what my mistake was. (Fiddle at url http://jsfiddle.net/azt4gujv/3/ btw)
In the meantime you wrote the test and by checking it I got confirmation of my suspects.
I was trying to chain the Dexie.Promise.resolve while in a parent transaction in the broader sense of the term. That is, I was starting parent transaction in the parent method and then doing the chain of the single methods. Some of these (I suppose, have yet to check in my real app but I bet there lies the problem) gave back the promise WITHOUT wrapping it in a sub transaction, that is:
function chainPart(obj) {
      if (obj.value == 'xyz') {
            return Dexie.Promise.resolve(obj);
      } else {
            return db.transaction('rw', db.table, function() {
                   return db.get(....);
            });
      }
}

function chainOfStuff(obj) {
     return db.transaction('rw', db.table, function() {
           return chainPart(obj).then(function(res) {
                 // Other chaining here....
           });
     });
}

BUT, if chainPart is written this way:
function chainPart(obj) {
      return db.transaction('rw', db.table, function() {
            if (obj.value == 'xyz') {
                  return Dexie.Promise.resolve(obj);
            } else {
                  return db.get(....);
            }
      });
}

It does indeed work! I was wrongly making the assumption that the parent (chainOfStuff) transaction was working on the Dexie.Promise.resolve in chainPart without the need of the db.transaction wrapping there!
I finally got the hint by re-reading the phrase
Dexie.Promise.resolve() MUST, when being called from within a parent transaction, NOT do setTimeout() to resolve itself.
I was basically chaining a promise along the way without wrapping that single step into transaction!
Sorry for having taken your time on this issue when the problem was just with me missing the point of wrapping the single chain parts in transactions was required. Maybe it won't be a complete waste if this error of mine can be put in the docs as something that must NOT be done :-)
I'll check the code in my app and I'm sure I'll find the bug I introduced by this misinterpretation somewhere (lots of cheering when I'll do :-)
In the meantime, thank you once more for the help!

An issue with nested transactions has been confirmed and filed as issue #95: When nesting a sub transaction without doing any operation in the parent transaction, transaction seem to fire off to early.


THREE.js loader - set crossOrigin='' to support loading resources fro…

…m external domains
In reference to: #3

Sweet! :)


Download per-graph data not respecting changed dates

To reproduce:

on the UKHPI browse page
change the date range to Jan 2015 - Dec 2016
see the graphs update
go to the download tab
click one of the download buttons

Expected: get a download of data for the selected date range
Actual: get a download of data for the default date range (year-to-date)

Fix deployed.

Have re-tested and correct data is showing for the dates.  Happy to close


Workflow for MacOS arm64 build with new GH runners

Not perfect, but everything works. As I mentioned on the issue the main issue was that conda seems to default to osx-64 rather than osx-arm64. Known issues are: there are some spurious and seemingly unnecessary steps in the action file, and also the artifact generated at the end has an incorrect filename.
Also, the matrix version of python is not setup very well in this PR.

Thanks for doing this @jdegenstein


Ability to exclude XCUIElements from being tapped

Firstly, thanks for this, it's a great tool, working generally fairly well for me in the few test runs I've used it for.
Secondly, apologies if this is covered in the framework already, I took a look at the Monkey.swift file and could see randomPointAvoidingPanelAreas, but that's not quite what I'd be after here (I think!)
Context for my request:
There's a few parts of my app I don't want the 'monkey' to tap: eg, links to webviews (which open Safari), links to other apps (eg: out to Maps), log out buttons (which we'd normally not want tapped, as our app largely needs to be tested while 'logged-in'), or even debug-build specific tap areas where we nest 'admin' functionality, etc, etc. When the 'monkey' taps these areas, the test is either invalid (I don't want the 'monkey' testing Apple Maps), or becomes not as interesting to me (eg: if logged-out, I don't care as much about what the 'monkey' finds)
Request:

Create a dictionary of items that need to be ignored by the 'monkey', perhaps as a list of XCUIElements.
Have the 'monkey' check for existence of items in this dictionary, and avoid these if the dictionary's populated
Continue on as-usual, if nothing's in the dictionary?
Or something like that maybe? The gist is: a way to exclude specific XCUIElements from tap events.

Hello @deemicksee and than you for using and contributing to SwiftMonkey!
The problem you have described is very interesting and challenging. The XCUIElement has a frame property that would be the screen area we do not want to tap. So if you provide a list of such elements we could exclude their areas when generating a random tap point.
Please give me some time to experiment with possible solutions. I hope to get back to you with some results and maybe even with a feature branch to test 😄

Wow, excellent, that'd be great thanks. Please let me know if I can help with the testing of it.

The problem here is that accessing properties of XCUIElements is very, very slow. So anything that needs to deal with XCUIElements at each click will basically grind the testing to a halt. This is why the code does not use public XCTest APIs at all.

Hey @DagAgren, @deemicksee ! Indeed accessing the frame property is really slow. I was however able to "solve" this by computing the area for tapping once and then using it when a random tap point needs to be generated. This however is not perfect since the position of an XCUIElement might change (scrolling) and then the pre-computed area is not valid anymore.
To demonstrate how it works, you can checkout this feature branch. It has a pre configured sample that sets Monkey to only generate tap actions. It also excludes from tapping all buttons except the "OK button" and the 2 bottom tab bar items. The result is that when the tests are running only the "OK button" gets tapped and the BananaViewController is never shown.
I would greatly appreciate if you could have a look at this implementation. I am not sure if it brings any value in the current state (works only for static XCUIElement objects). It should be fine to use it for disabling tapping on Cancel, Done, etc. buttons that would dismiss the tested screen. However as soon as someone uses it on a scrolling content - it becomes broken.
I wonder if there is a more optimal way of getting the frame? Or maybe detecting that the frame has changed and it should be queried again?
Side note
The algorithm works by dividing the frame into smaller rectangles and removing those that intersect with the tap excluded frames. This image should clarify it:

If you call rect.divided(toExclude: [...]) you will get a list of orange rectangles. Then you need to pick a random orange rectangle, generate a random CGPoint within it and voilà! You have a random point that doesn't intersect with UIButton nor UISwitch frames.

I thought about this feature and with the limitations we currently have a reasonable scope of it is to:

Globally block certain parts of the screen from being tapped by SwiftMonkey.

This means that an API that accepts an array of XCUIElement is misleading and instead it should just take a CGRect collection.

Hey team, apologies for the delay in replying here, I've been busy with a newborn ;)
Some extra context: in the app I'm testing at the moment, there are maybe ~50 elements I do not want tapped, and ~5000 ones I do want tapped. The app has pages that go about as deep as 8 pages away from the home-screen at any time
Here's my feedback on the tap-excluded-elements branch:

[ ]  my app supports as far back as iOS 8. With this branch though, I had to edit these files locally, to add: “@available(iOS 9.0, *)” to the top of Monkey.swift + MonkeyUIAutomation.swift + MonkeyXCTestPrivate.swift. Is it possible to add those permanently in that branch?

[ ] I might be missing something important here, but it looks like this only really works on a single-page app. Scenario: I need to exclude different items on pages 2, 3, and 4, and I set the monkey off on page 1; I don't know when the monkey will get to pages 2, 3, and/or 4. At present, the tests fail for me, because the excluded items in pages 2,3,4 can't be found when I start the testing at page 1. XCode logs:
"No matches found for Find: Descendants matching type Table from input {(
Application, 0x6080001893e0, pid: 82352, label: 'My App'
)}"
I can't think of many ways around this; it is essentially the same problem as the 'scrolling' one that @wojciechczerski mentioned above. We'd need to have a way to redraw the screen's rectangles and the list of elements to exclude

[ ] it's possible I'm misunderstanding what's been done here, but I think monkey.tapExcluded should be named monkey.tapOnlyTheseElements or something like that? It looks like the list works the opposite of what I was hoping for: the monkey uses tapExcluded to only tap the things it's told to tap.

[ ] As a follow-up to this ^, I can make the current code work, but I'd prefer to have a small list of elements to exclude tapping, rather than a large list of elements we want the monkey to tap

Hopefully that feedback makes sense. I appreciate the effort put in to get us this far! I think it's fairly close here, but might only work usefully as-implemented on single-page apps that don't change the UI too much?

Hi, and thanks for the feedback! Regarding your questions:
The deployment target was set to 9.0 because this is required for using the XCUIElement class. This however might be changed because the implemented solution doesn't really work with XCUIElement objects but instead with CGRect collection that is extracted from the given elements to exclude using the frame property.
Unfortunately this is a one-screen-solution or if you rephrase it one-solution-for-all-screens. To make it really dynamic we'd have to query the frame property each time a random point to tap is generated - this will kill the performance because each query to XCUIElement or its properties is very slow.
This issue seems to be a real blocker for making this feature useful and unfortunately I don't have any good ideas on how to proceed.
The tapExcluded collection should contain elements you wish NOT to tap. The code should work like that - are you observing a different behavior?
I could change the interface for this feature to var tapExcluded: [CGRect] to clearly indicate that it works with static frames. The question is whether or not such feature is useful at all. Like you mentioned it would work for single paged apps and also maybe if your app contains some global tap areas (tab bar?) that you wish not to tap. These are however rather extreme use cases.

Hi there,
Thanks for the feedback, yeah I agree this idea might be a non-starter in that case.
I've been working on a workaround that seems to be working for me. It uses the main branch of SwiftMonkey, instead of this feature branch. The upshot is: 2 x 'while' loops help me check:

persistent navigation element is on screen. If it is, then monkey around. After monkeying, return to the app (this will only work on the simulator, but I assume most testing with this tool is done in the simulator?)
if the monkey got deep within a multi-page app, then move backwards/forwards by interacting with known buttons. I call this a 'sink'; the Monkey is stuck in a sinkhole and needs to escape to provide meaningful test coverage

Here's a dummy version of that code:
import XCTest
import SwiftMonkey

class PageObjectTests: BaseTest {
    func testName() {
        let app2 = XCUIApplication()
        // for 3 loops, Monkey around
        let i:Int = 0
        while i < 3 {
            let myApp = XCUIApplication(bundleIdentifier: "{myBundleName}")
            // if my persistent Nav bar exists, I'm safe to Monkey
            if app2.tabBars.buttons["MyAlwaysPresentNavBar"].exists {
                    _ = app2.descendants(matching: .any).element(boundBy: 0).frame
                    let monkey = Monkey(frame: app2.frame)
                    monkey.addDefaultXCTestPrivateActions()
                    monkey.addXCTestTapAlertAction(interval: 100, application: app2)
                    monkey.monkeyAround(iterations: 20)
                    //Go back to the app at the end of the Monkeying. It's possible a round of Monkeying happens external from the app, but it's not too bad provided you have a few loops of 'while'
                    myApp.activate() // <--- Go back to your app
                }
                    // If my persistent Nav bar doesn't display, we might be trapped in a weird in-app view that doesn't give access to the Nav Bar
                    // This next while loop helps us here to escape 'in-app sinks'
                    // We need to take evasive action to escape an 'in-app sink' able to close that view, but we can't predict where we are so we need a series of if / else' to best-guess how to escape
                else {
                    let listOfButtonsToGetOutOfTheSink = ["Cancel","Back","Continue","Done"]
                    let i2:Int = listOfButtonsToGetOutOfTheSink.count
                    while i2 < 4 {
                            if app2.buttons[listOfButtonsToGetOutOfTheSink[i2]].exists {
                            app2.buttons[listOfButtonsToGetOutOfTheSink[i2]].tap()
                        }
                    }
                }
            }
                print(app2.debugDescription)
                break
        }
        tearDown()
    }

Provided there's a good balance between Monkey iterations + numbers set on the initial 'while' then a fair amount of the app can be safely tested. Sometimes the Monkey taps on something that takes the user out to Safari, but now it doesn't matter that much!
That's my best workaround to use this tool, without pushing further on this Feature Branch. I think we can probably close this Issue now, if you agree. Thanks for your efforts, I think they'd work well for anyone in a reliably single-screen app.
Cheers!

Hey! I will close the issue just like you suggested. I think we've reached a good conclusion of not pushing this feature as it is currently not possible to implement it correctly - to be accurate and having good performance.
Thank you very much @deemicksee for an amazing support for the project!


Context menu on directory lacks delete

Might have been intentional but I think it is needed. Here is how goland handles this potentially dangerous operation.

Implement recursive delete and then change FileTreeInactiveDirFunc to FileTreeActiveDirFunc.

Done and tested! Confirms if any open text bufs and closes all before delete.


Out of bounds exception when creating a vertex with a default value

OrientDB Version: community-2.2.29
Java Version: OpenJDK 1.8.0._131
OS: Ubuntu 16.10
Expected behavior
When running the following script in the OrientDB console:
create sequence test_seq type ordered

create class test extends v
create property test.value string (notnull true, mandatory true)
alter property test.value default 'sequence("test_seq").next()'

export database db.json.gz
import database db.json.gz

create vertex test

I expected a vertex to be created...
Actual behavior
... but an error gets thrown:
Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on reading parameters in: sequence(	est_seq\)
	DB name="test_bug3"

Error: java.lang.ArrayIndexOutOfBoundsException: 8

Steps to reproduce
Run the script specified above.

Quick update on this issue, the problem seems to be in the import procedure.
As a work-around, you can re-execute the following command after import
alter property test.value default 'sequence("test_seq").next()'

It should fix the problem
Thanks
Luigi

The workaround does work on my machine, thank you for posting it !