InitializeTenancyByPath with livewire within tenant context throws exception

Bug description
Laravel throws Undefined array key 0 received when using InitializeTenancyByPath with livewire within tenant context.
Steps to reproduce

tenancy identifies tenant by path:

Route::subDomain('http://tenant.localhost.test')
    ->as('tenant.')
    ->middleware([
        'auth:tenant',
        PreventAccessFromCentralDomains::class,
        InitializeTenancyByPath::class,
    ])
    ->prefix('/{tenant}')
    ->group(function () {
        Route::get('/', TenantHomeController::class);

Update laravel middleware in LivewireServiceProvider::boot()

Livewire::setUpdateRoute(function ($handle) {
            return Route::post('/livewire/update', $handle)
                ->middleware([
                    'web',
                    'universal',
                   InitializeTenancyByPath::class
                ]);
        });

Place a livewire component in tenant.localhost.test/{tenant}/
trigger a livewire roundtrip (i.e wire:click a button)

Expected behavior
Undefined array key 0
in Middleware/InitializeTenancyByPath.php:40
Stack trace
Laravel version
11.4.0
stancl/tenancy version
3.8.2

Would it be fair to say that InitializeTenancyByPath is not entirely compatible with livewire and one need to search for an alternative?

@stancl i was just going to

Right that makes sense. We're adding the identification middleware to these routes so setting them inside bootstrappers (that run after identification) won't work. I remembered we had another solution for path identification, I'll find it and mention it here.

Any luck so far, @stancl?

Ah sorry, meant to post here but didn't get to it.
Essentially, the setup we use in v4 is more dependent on some features added in v4, but can be replicated with a bit of work:

You set the route as above, with just the 'universal' and InitializeTenancyByPath::class MWs added
You use the v4 route cloning feature to create a tenant version of that route (manually you'd do this by registering that same route again but with /{tenant} path prefix and tenant. name prefix)
You use the v4 URL generator override to automatically use tenant. routes when in tenant context

This will lead LW creating a path to either the central route or the tenant route based on the current context on the initial render, and then subsequent requests will respect that URL.

I'm currently facing the exact same problem.
I tried doing something like this:
Livewire::setUpdateRoute(function ($handle) {
            $tenantIdentifier = request()->segment(1);
            return Route::post("/{tenant}/livewire/update", $handle)
                ->middleware(
                    [
                        'web',
                        'universal',
                        InitializeTenancyByPath::class,
                    ])
                ->defaults('tenant', $tenantIdentifier)
                ->name('livewire.update');
        });

Unfortunately it didn't work due to a Missing required parameter error. If anyone was able to make this work using v3 I would really appreciate it.

@abikali
@stancl
@nickfls
Im facing this problem and this is what i did:
First i added the livewire update route to the TenancyServiceProvider
Livewire::setUpdateRoute(function ($handle) {
            //\Livewire\Mechanisms\HandleRequests\HandleRequests::class
            return Route::post('/livewire/update', $handle)
                ->middleware(
                    'web',
                    'universal',
                    \Stancl\Tenancy\Middleware\InitializeTenancyByPath::class, // or whatever tenancy middleware you use
                );
        });
        $this->makeTenancyMiddlewareHighestPriority();

Then i had to modify (or maybe create a new MW) InitializeTenancyByPath
public function handle(Request $request, Closure $next)
    {
        /** @var Route $route */

  /**
   *  We need to check if the request is a livewire request
  **/

      if(Livewire::isLivewireRequest()) {

            $tenant = explode("/", $request->server('HTTP_REFERER'))[3];
            $tenant = YourTenantModel::find($tenant);
            \tenancy()->initialize($tenant);
            return $next($request);

        }

        $route = $request->route();

        // Only initialize tenancy if tenant is the first parameter
        // We don't want to initialize tenancy if the tenant is
        // simply injected into some route controller action.
        if ($route->parameterNames()[0] === PathTenantResolver::$tenantParameterName) {
         return  $this->initializeTenancy(
                $request, $next, $route
            );
        } else {

            throw new RouteIsMissingTenantParameterException;
        }

        return $next($request);

And thats all, livewire its working on central and tenant routes.


Updated babel-core and removed estraverse dependencies

Removed estraverse dependencies as per #135

Yay! :+1:


replace {dev} with :with-test

When this package is added as a dependency of another project, because it has not been published to opam, the behavior of dev variable is to become true and so dev dependencies will get installed as well. In jsoo-react case, this means reason gets installed, which means trouble with recent OCaml versions like 4.13.1.
From opam docs:

dev: true if this is a development package, i.e. it was not built from a release archive

From @aantron in Discord:

yeah it seems that its best to use it for things that are actually necessary for the build of an unreleased package specifically, which is few things in ocaml these days (nothing for most projects), and is probably bad form

Ideally, there'd be a with-dev flag, but it doesn't seem to exist. So for now, i'm (ab)using with-test for this.

Merging.
ftr there will be a with-dev in future versions of opam 🎉 https://github.com/ocaml/opam/issues/4959#issuecomment-996614645


Limit max number of concurrently running deployments

Summary:
Added a new command parameter --max_running_deployments limiting the max number of concurrently running deployments in the system. By default max_running_deployments is set to 100. Over the limit, deployments are dismissed with an HTTP 403 Error and a helpful error message. Added a new metric to help monitor the number of dismissed deployments.
JIRA: MARATHON-8172, MARATHON_EE-1955

+1 to what Alena wrote, otherwise looks good to me too.

I think we should also alter the documentation for command line parameters...
And a changelog, maybe? :)

Both very good points. Done and done.


Info On Classic Series Episodes

Info On All The Episodes In The Classic Series On All Platforms.

Completed In Release: 1.0
Commit: https://github.com/markydoodled/DW-Episode-Guide/commit/0f9d1916ccd7c86509ca674b908d6981734a5572


Large File Confirmation not showing up in v1.79.2

Does this issue occur when all extensions are disabled?: Yes

Version: 1.79.2 (Universal)
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:58:52.392Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 22.5.0

Steps to Reproduce:

Use default value workbench.editorLargeFileConfirmation=1024
Open file larger than 1024 MB
File opens without any warning about large file

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.
Happy Coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Encoding a template

Hi,
My goal is to mount a file with authentication information into a pod, via a Secret object. So I need to generate the configuration, interpolate values (login, password, database) and encode it. I tried this:
apiVersion: v1
kind: Secret
...
data:
  myfile.ini: |-
    {{ template "myfile" . | b64enc }}

The configuration is generated with the right values, but I got this error message:
$ helm install . -n test1 --dry-run --debug
[debug] Created tunnel using local port: '36169'
[debug] SERVER: "<IP_ADDRESS>:36169"

[debug] Original chart version: ""
[debug] CHART PATH: /home/sdouche/src/sr/test
Error: render error in "test/templates/secret.yaml": template: test/templates/secret.yaml:21:38: executing "test/templates/secret.yaml" at <b64enc>: wrong type for value; expected string; got chartutil.Values

How to do this?
Regards

You'll want to use .Files.Get instead. See https://github.com/kubernetes/helm/blob/14136964f5712431b8ff13f1ada378105e1bfd9c/docs/chart_template_guide/accessing_files.md for more information. :)

Have you tried this?
apiVersion: v1
kind: Secret
metadata:
  name: very-secret
type: Opaque
data:
{{ (.Files.Glob "bar/*").AsSecrets | indent 2 }}

Hi @bacongobbler @rofc. Forgot to say I already tried .Files methods, I can encode but w/o values extrapolation. The result is:
[alembic]
script_location = src/sr/booking/database/migrations
sqlalchemy.url = postgresql+psycopg2://{{ .Values.db.username }}:{{ .Values.db.password }}@<IP_ADDRESS>:5432/{{ .Values.db.name }}

I ran into this issue today and figured I should leave a response in case others also come across this.
@sdouche, per the named templates documentation template is an action, not a function, so its output cannot be passed to other functions like you're trying to do with b64enc. The solution is to use include, and it acts as a drop-in replacement.
Thus, your solution would be to have {{ include "myfile" . | b64enc }}. This will allow you to run the variable interpolation within the myfile template.

Have you tried this?
apiVersion: v1
kind: Secret
metadata:
 name: very-secret
type: Opaque
data:
{{ (.Files.Glob "bar/*").AsSecrets | indent 2 }}

the OP needs to do interpolation.  .AsSecrets returns the base64 so interpolation won't replace any values

Can we close this issue, or are there further questions that still need an answer to?

I finally was able to get this working for a secret with an arbitrary number of files.
apiVersion: v1
kind: Secret
metadata:
  name: mysecret-app-config
type: Opaque
data:
  somekey: {{ .Values.somevalue | b64enc }}
{{- range $path, $_ := .Files.Glob "configs/*" }}
{{ $path | replace "configs/" "" | indent 2 }}: |-
{{ tpl ($.Files.Get $path) $ | b64enc | indent 4 }}
{{- end }}


[NEW] Support 'favorites' for channels and users in chat list

Your Rocket.Chat.Android version: v2.0.0-alpha1
The standard 'chats' view is a list of all users and channels that the current user has participated in.  There is currently no way to pin a particular user or channel to the top of this list like there is in the web-UI.  The web-UI uses the 'favorites' notion to create this pinned list, and it would be natural to extend this to the Android app.
This is related to, but different from #880 which addresses the order in which the chats are sorted (independent of 'favorites').

i am unable to see online users in android app, why?

Duplicates #1395


Ionic 2: Module 'moment' has no exported member 'UnitOfTime'.

I updated the ionic-app-scripts to 0.0.42 and on process 'transpile', I got the following error:
[14:21:19]  transpile started ...
[14:21:23]  typescript: ...nfo/app/node_modules/angular2-moment/difference.pipe.d.ts, line: 4
Module 'moment' has no exported member 'UnitOfTime'.
   L3:  export declare class DifferencePipe implements PipeTransform {
   L4:   | moment.Moment, otherValue: Date | moment.Moment, unit?: moment.UnitOfTime, precision?: boolean): number;

[14:21:23]  transpile failed
As we can see, the 'UnitOfTime' is not an exported module from 'moment'. What I can do to solve this?
Angular2-moment version used is 1.0.0-beta.6.

Same issue here.   I don't see anywhere in the momentjs documentation where 'UnitOfTime' exists.

As a workaround until it gets fixed, I added class UnitOfTime {} inside of declare namespace moment {} in the file moment.d.ts. With this, the project at least compiles.

I confirm that angular2-moment currently produces this error with moment 2.16.0. This is the specific commit that introduced that change: https://github.com/moment/moment/commit/8c0c6a33a1b81ab0c4b5b9567b5678c59af8accb
I hope to publish a new release that will address it within the next few days

Work!
@urish thanks!

Just wanted to let others know what solution worked for me--I did not revert to the older version of moment -- I am using 2.17.1. Also I didn't need to change any typings files at all.
What I did, in my angular component .ts file was to cast my string variable into the moment
some.component.ts
let convertedChartPeriod: moment.unitOfTime.StartOf = <moment.unitOfTime.StartOf>this.chartPeriod;

var reportStartDate = moment(itemDate).startOf(convertedChartPeriod);

Things of Note:

proper class name for v2.17.1 is moment.unitOfTime.StartOf
use the <moment.unitOfTime.StartOf> with the "<>" brackets to cast the string into the proper class.
No need to change any Damn typings files!

Hi everybody I have  this issue: 'moment' has no exported member 'DurationInputArg1'.
Someone knows what happen ?  @bitterloa @urish
Complete error:
ERROR in<EMAIL_ADDRESS>(154,27): Namespace 'moment' has no exported member 'DurationInputArg1'.

This is still happening for me.
ERROR in /home/ubuntu/app/node_modules/angular2-moment/subtract.pipe.d.ts
(4,42): error TS2694: Namespace 'moment' has no exported member 'DurationInputArg1'.

ERROR in /home/ubuntu/app/node_modules/angular2-moment/subtract.pipe.d.ts
(4,75): error TS2694: Namespace 'moment' has no exported member 'DurationInputArg2'.

ERROR in /home/ubuntu/app/node_modules/angular2-moment/difference.pipe.d.ts
(4,92): error TS2694: Namespace 'moment' has no exported member 'unitOfTime'.

ERROR in /home/ubuntu/app/node_modules/angular2-moment/add.pipe.d.ts
(4,42): error TS2694: Namespace 'moment' has no exported member 'DurationInputArg1'.

ERROR in /home/ubuntu/app/node_modules/angular2-moment/add.pipe.d.ts
(4,75): error TS2694: Namespace 'moment' has no exported member 'DurationInputArg2'.

<EMAIL_ADDRESS><EMAIL_ADDRESS>


Free variables not used in method's signature

A free variable declared using forall only works if it is used in the method's signature. This allows the compiler to defer a concrete type for each method instantiation.
Currently, this code compiles:
def foo() forall T
end

foo

The same is true when the method has arguments but none of type T.
I think this code should fail, because an explicitly declared free variable is not used and can't be deferred.
When the free variable is used inside the method, it already fails because the constant is not defined, even though it's declared as a free variable.
def foo() forall T
  T # Error: undefined constant T
end

foo

This error message is not as clear as when the method signature would already error with a message saying that you can't use a free variable unless it's used in the arguments.
When leaving out the empty parenthesis (which is otherwise valid when there are not arguments), it is already a syntax error:
def foo forall T # Syntax error: unexpected token: forall (parentheses are mandatory for def arguments)
end

foo

When the free variable is used in a block argument, this is also already an error:
def foo(&block : T -> _) forall T # Error:  undefined constant T
end

foo {|x| x}

That's because the type of block arguments has no influence on method dispatch and instantiation. Thus free variables can't be deferred from block arguments.
It would be great however, if this would raise a similar and more meaningful error.
This issue came up on the forums in https://forum.crystal-lang.org/t/generics-type-parameter-inherite/724 and I added a few more scenarios.

The original example described a special case when free variables are combined with generic type arguments. Because both share the same namespace (single uppercase letters), a free variable can use the same name as a generic type argument and overrides it in the respective method's scope.
The exact same method as in the second example, but declared inside a generic type, suddenly compiles:
class Foo(T)
  def foo() forall T
    T
  end
end

Foo(Nil).new.foo # => Nil

Since the free variable can't be deferred, T simply references the generic type argument.

About the last example with a block:
def foo(&block : T -> _) forall T # Error:  undefined constant T
end

foo {|x| x}

What about if we pass a proc? (didn't tested) It should work since the proc is typed.

The block input argument is used to compute the block output argument, for example to be able to define Enumerable#map or Array#map. So using forall T with a block argument will never work.

@bew it work with a proc.
This https://github.com/alex-lairan/monads/pull/25 resolve the error we got with block by using a proc instead.
It's not pretty, but it do the job.

Following code is valid:
def method1(proc : _ -> _)
end
method1(->(x : Int32) { x })

But, following code isn't valid.
def method2(&block : _ -> _)
end
method2 { |x| x }

Using a proc as a regular argument is an entirely different case. A Proc(X, Y) argument is like Hash(X, Y) just a plain generic type.
This has nothing to do with block arguments (incl. captured procs).

Of-course it's not the same.
But the block behavior and the proc behavior are similar in a user point of view. (Not similar for an expert or a core developer)

This is a bit impossible to do with how macros work. Should this compile?
def foo(x) forall T
  bar
end

Unfortunately bar could be a macro that uses T so it's really hard to see, syntactically, that T is used.
Plus I think this is very low priority.

@asterite That's exactly my point. Whether forall T compiles shouldn't depend on whether T is used in the method body. It only matters if T is used in the arguments. If not, it should always fail.

I know it's a low priority, but there is any changes or planned change for this issue ? :smile:

This works, for now, I don't know from when, but it works :)
Solve https://github.com/alex-lairan/monads/pull/58


Unable to get notifications on iOS

Hello.
I have notifications working on Android, but not on iOS.
I can't understand why.
I'm trying the App with TestFlight, the App correctly sends the token, but I still can't get any notification from Firebase test notifications.
Also the App didn't asks me the permission to send notifications.
This is my package.json
{
  "name": "XXX",
  "version": "0.0.1",
  "author": "XXX",
  "homepage": "XXX",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^11.0.2",
    "@ionic-native/core": "^5.30.0",
    "@ionic-native/device": "^5.30.0",
    "@ionic-native/splash-screen": "^5.30.0",
    "@ionic-native/sqlite": "^5.30.0",
    "@ionic-native/status-bar": "^5.30.0",
    "@ionic/angular": "^5.5.1",
    "bufferutil": "^4.0.2",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.2.1",
    "cordova-plugin-splashscreen": "^5.0.4",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-sqlite-storage": "^5.1.0",
    "node-sass": "^4.14.1",
    "rxjs": "~6.5.5",
    "tslib": "^2.0.3",
    "utf-8-validate": "^5.0.3",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/architect": "^0.1100.2",
    "@angular-devkit/build-angular": "^0.1100.2",
    "@angular-devkit/core": "^11.0.2",
    "@angular-devkit/schematics": "^11.0.2",
    "@angular/cli": "^11.0.2",
    "@angular/common": "^11.0.2",
    "@angular/compiler": "^11.0.2",
    "@angular/compiler-cli": "^11.0.2",
    "@angular/core": "^11.0.2",
    "@angular/forms": "^11.0.2",
    "@angular/language-service": "~10.0.0",
    "@angular/platform-browser": "^11.0.2",
    "@angular/platform-browser-dynamic": "^11.0.2",
    "@angular/router": "^11.0.2",
    "@ionic/angular-toolkit": "^3.0.0",
    "@types/jasmine": "~3.5.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.19.7",
    "codelyzer": "^6.0.0",
    "cordova-android": "^9.0.0",
    "cordova-ios": "^6.1.1",
    "cordova-plugin-androidx": "^3.0.0",
    "cordova-plugin-androidx-adapter": "^1.1.3",
    "cordova-plugin-fcm-with-dependecy-updated": "^7.7.0",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.0.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~3.3.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "^4.0.5"
  },
  "description": "Clinica Veterinaria San Gaetanino",
  "cordova": {
    "plugins": {
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-androidx": {},
      "cordova-plugin-androidx-adapter": {},
      "cordova-plugin-fcm-with-dependecy-updated": {
        "ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher",
        "ANDROID_FCM_VERSION": "21.0.0",
        "ANDROID_FIREBASE_BOM_VERSION": "26.0.0",
        "ANDROID_GOOGLE_SERVICES_VERSION": "4.3.4",
        "ANDROID_GRADLE_TOOLS_VERSION": "4.1.0",
        "IOS_FIREBASE_MESSAGING_VERSION": "~> 7.0.0"
      }
    },
    "platforms": [
      "ios",
      "android"
    ]
  }
}

I also tried to follow this link (https://customersupport.doubledutch.me/hc/en-us/articles/229495568-iOS-How-to-Create-a-Push-Notification-Certificate) but it asks for a user and password and I don't know how to get them.
I'm facing this issue from many days, and I really don't understand how to get rid of it.
Can you help me?

I'm also receiving this error. I am successfully generating my token, but IOS does not receive any notifications.
I've also seen that I cannot receive any notifications sent from the FCM Console.
I'm also using 7.7.0.
Does anyone have an idea?

I fixed my bug in this regard. I did not add the permission system for IOS as indicated in the documentation

I fixed the problem calling the function FCM.requestPushPermission().
This should really be clearly stated in section Push Notifications on iOS!

Same problem here, any updates? thanks in davance.

Did you tried calling the function FCM.requestPushPermission()?

Did you tried calling the function FCM.requestPushPermission()?

hello @piciuriello yes, i tried FCM.requestPushPermission() but still doesn't work

Same problem here, any updates? thanks in davance.

At development time notifications are working fine in IOS, but not when the app coming from TestFlight. And i don't know why, please help.

Maybe you have a certificate issue?
Give a look at this article for example: https://fluffy.es/remote-push-notification-testflight-app-store/


Update npm package

Hi there! Is it possible to update the npm package? Moreover, having a github action do it would be ideal. No more manual requests.

when I install the NPM package chessboardjs it depends on version 0.0.1 (instead of 1.0.0) I'm assuming this was asked in this issue, am I right?

@faeb187 I am sorry you have had some troubles with all of this.

Looks like there was another guy forking your repo when it was v0.0.1 and now it's misleading

Yes - I believe someone forked this project and pushed it to npm at some point in the past.

You should communicate this

The download page lists the scoped package @chrisoakman/chessboardjs

It's a huge mess anyway, the typings @types/chessboardjs are kinda linked to the v0.0.1 too it seems

I am not involved with @types/chessboardjs

Is it possible to update the npm package?

@chrisoakman/chessboardjs contains the latest release of this library

I updated the README with clearer links to the scoped npm package.


feat(useLazyRef): add new hook

Creates a mutable reference object from a factory function.

Codecov Report

Merging #2 into master will decrease coverage by 6.38%.
The diff coverage is 25%.

@@            Coverage Diff             @@
##           master       #2      +/-   ##
==========================================
- Coverage     100%   93.61%   -6.39%
==========================================
  Files           1        1
  Lines          43       47       +4
  Branches        1        3       +2
==========================================
+ Hits           43       44       +1
- Misses          0        3       +3

Impacted Files
Coverage Δ

src/index.tsx
93.61% <25%> (-6.39%)
:arrow_down:

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 85c25e0...3c545c5. Read the comment docs.

fix #1


Group tag fix changes into fewer changesets

At the moment when completing tag fix challenges each change goes into its own changeset.
This can lead to huge numbers of changesets, which makes reviewing them harder.
One option would be to group all tasks from a challenge into one changeset, with the changeset not being closed so that anything else added before it is automatically closed goes into that same one. (Similar to what StreetComplete does, for those familiar with that).
However this could lead to a very large bbox if the challenge covers a large area, so maybe something cleverer is needed to not allow large bboxes.

MapRoulette follows best practices in OSM, being that changesets should be kept reasonably small. Due to the nature of MapRoulette's random task assignment, as you indicate, collecting tag fixes into multiple changes would create changesets with large bounding boxes, which is undesirable.


aViewer compatibility with Windows 10

Just a placeholder issue, as Windows 10 final isn't out yet...but worth flagging up that in one of the recent Insider Preview builds (10162) aViewer does not seem to work at all - the application starts, I can register the .dll, but nothing is displayed. In certain situations, I can get the yellow "focus only" rectangle to appear, but even this is inconsistent.

Which browser are you using?
Edge browser: Each element doesn't return IAccessible.
Firefox: The QueryService function for "ISIMPLEDOMNODE" fails. I don't know the cause.
After Windows 10 is released, I will examine them.

Just revisiting this with release version of Windows 10. The aViewer version we currently distribute on the TPG site http://www.paciellogroup.com/resources/aviewer/ crashes consistently as soon as you switch from aViewer (with "highlight focus" and the "show rectangle" options on) to IE11.
The builds here on GitHub do work nicely though. Is there any reason why we're not pointing the public to those builds, rather than the (now outdated, I'm guessing) 2014 version? Could we do a proper "release" and point to it, like we do for WAT? http://www.paciellogroup.com/resources/wat/

@patrickhlauke sounds like something we should do pronto looping in @matatk as he is lord of the releases

That sounds like an ominous title :-).  I'm not sure where we are with this aViewer; seems like it is behind the times, as @patrickhlauke says.  The long-term plan would be to:

Get all the code that makes up CCA, aViewer and WAT into their repos (currently we depend on some binary parts), so that
we can build a complete release entirely from the source on GitHub (no binaries, on which we currently depend) at any time, and
we could link the WAT repo to the CCA and aViewer repos, so that when WAT is built, a certain CCA/aViewer release is built (using git submodules would be good for this, as it would allow us to decide which CCA/aViewer revision to include in any given WAT revision, so we can still manage releases).

Steve found what appears to be a suitable IDE called Lazarus which we are hoping we could use.  Perhaps we could enlist @jun325's help to

see if lazarus is a viable solution, and, if so,
get all the code on GitHub so we can start to link things up, as above.

If we could ask @jun325 to get all the source up here and to check the IDE will work for us, then I could look at linking the repos together and making a build process that will build and include them all when WAT is built.  How does that sound?

thanks @matatk sounds like a plan, what can we do in th short term to make the windows 10 compatible version available?

can we just package up the existing .exe files that are here right now as a release, and worry about the most correct way to package everything up for the next release? that way, we can get the quick low-hanging fruit of just pointing the TPG site to the github release in the first instance, so in future we won't have to bother updating the site and automagically always point to the freshest version? @matatk

Those two approaches are not incompatible -- it would be good to get a release out ASAP, yes.  I think we really need to do the full approach ASAP after that, though, or it'll be a black hole for maintenance time :-).
IIRC there's not much to do to package up an aViewer 'release' as there's no installer, so this could be done quite quickly.  I can look into it later today perhaps... I've made a new issue to track this: #5

Also, quick note for future reference: when the above stuff with code has been completed, git should no longer be used to store any .exe or .dll files (as it will not be needed; we will build them).  Only the releases will need to contain such files.

Closing as the immediate issue at the time (Win 10 compat and making a quick release) has been resolved


Use port as env variable in examples

Updates README

@daetherius can you please rebase master into this branch, and add the env code to the new location example?

@deadprogram Sure!

Thanks!


[google_maps_flutter] iOS: Child route draws partially over parent route after pop route

I encountered a strange issue with google_maps_flutter (^0.5.21+2), that I can only reproduce on iOS devices, but not on the simulator:
I have two pages, both containing a google map widget. When I press the home button or open another app on the second screen, the re-open my flutter app, and go back to the previous page, flutter does not correctly redraw the first page.
I observed that I can still click on elements that are on Page 1, but I cannot see them. If you remove the google map widget from either of those two pages, the bug does not occur.
Here is a video with the sample app: https://imgur.com/a/KFeJsUS
Steps to Reproduce

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Page 1'),
      ),
      body: GoogleMap(
        initialCameraPosition: CameraPosition(
          target: LatLng(0, 0),
          zoom: 9.5,
        ),
        mapType: MapType.normal,
        markers: {
          Marker(markerId: MarkerId('123'), onTap: () {
            Navigator.of(context).push(MaterialPageRoute(
              builder: (context) => PageTwo(),
            ));
          }),
        },
      ),
    );
  }
}

class PageTwo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Page 2'),
      ),
      body: GoogleMap(
        initialCameraPosition: CameraPosition(
          target: LatLng(0, 0),
          zoom: 9.5,
        ),
      ),
    );
  }
}

Open the app
Click on the marker (lat: 0, lng: 0)
Close the app by pressing the home button (App goes into the background, does not get killed)
Open the app again
Click on the back chevron in the navigation bar

Logs

No log is printed while executing the steps described above.

$ flutter analyze
Analyzing maps_bug_example...
No issues found! (ran in 5.8s)

$ flutter doctor -v
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G87, locale
    en-DE)
    • Flutter version 1.9.1+hotfix.2 at /usr/local/bin/flutter
    • Framework revision 2d2a1ffec9 (10 days ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/martin/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Users/martin/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Users/martin/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android
      Studio.app/Contents
    • Flutter plugin version 38.2.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2019.2.2)
    • IntelliJ at /Users/martin/Applications/JetBrains Toolbox/IntelliJ IDEA
      Ultimate.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] Connected device (2 available)
    • Android SDK built for x86 • emulator-5554                        •
      android-x86 • Android 10 (API 29) (emulator)
    • iPhone Xʀ                 • 954462E6-5F2A-4FC3-85F1-E62C8BEC4AE5 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)

! Doctor found issues in 1 category.

also happens when shutting down the phone (instead of pressing the Home button)

We experienced the same problem this morning with @benoitjadinon.
The dirty fix we found was to toggle the opacity of the Google map widget to 0 when navigating page 2, and toggle it back to 1 when coming back.
(also works with the "Visibility" widget except you lose the position changes on google maps every time you make it appear)
I know ... it's a dirty solution ;)
`import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
double opactity = 1;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Page 1'),
),
body: Opacity(
opacity: opactity,
child: GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(0, 0),
zoom: 9.5,
),
mapType: MapType.normal,
markers: {
Marker(
markerId: MarkerId('123'),
onTap: () async {
setState(() {
opactity = 0;
});
await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => PageTwo(),
));
setState(() {
opactity = 1;
});
}),
},
),
),
);
}
}
class PageTwo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Page 2'),
),
body: GoogleMap(
initialCameraPosition: CameraPosition(
target: LatLng(0, 0),
zoom: 9.5,
),
),
);
}
}
`

@louisdedecker Thanks, this works!  Dirty workaround but at least it works.

@timeuser this workaround was inconsistent for me and caused odd UI artifacts or it would ignore gestures altogether after swiping back. It seems for complex apps it is not a reliable workaround.

@RyanRamchandar @louisdedecker It seems to depend on your widget tree how effective it can be. I ended up having to use a Visibility widget as mentioned instead of Opacity on a Drawer widget I had farther up the tree that was disappearing also. It is definitely not what I consider a solution. It's dirty and makes the app screen flicker and flash but I've been able to make our app function at least. Hopefully the Flutter team fixes the underlying problem soon.

@timeuser Good idea. I'll try moving the Opacity/Visibility widget higher up the tree to see if that is more consistent. I agree that making it functional > looking pretty in this case. Currently, this is a pain point for all my iOS users.

Thanks a lot! The dirty workaround works to me.
Is there any update for this?

#35183

This workaround does work, but it doesn't prevent another problem:
I have a Drawer in my first page. After going through the steps I described above, applying the workaround by toggling opacity to 0.0 before pushing the route and back to 1.0 after the user returned, I open the navigation drawer, but the drawer is invisible. It does listen for clicks, I just can't see the drawer, the buttons are there.
I've tried to move the Opacity widget further up the tree to include the whole scaffold, which didn't prevent it from happening.
I am only able to make the drawer visible again by blindly clicking on another menu item in the nav drawer and opening another route (without Google Maps) by doing this.
Again, this only happens on physical iOS devices, not on Android or on the Simulator.

@martin-fink As mentioned above I had the same problem with a Drawer. The only way to make it work was to use Visibility widget instead of Opacity in the hack. That effectively removes that widget subtree completely and causes it to lose state but it is displayed for me then.
Hopefully this is actually fixed soon. Comment here indicates it may be fixed in Dev channel.

@timeuser Yeah, I tried to use Visibility, but somehow that caused the whole app to crash after repeatedly opening and closing the second page with a Terminated due to memory issue error.
Thanks for linking me to that thread!

I've tested the bevhavior with the latest beta channel, and it seems that everything should work fine now. Hopfully the fix will soon be merged into the stable channel.
Flutter 1.12.13+hotfix.2 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 4f54e46f56 (23 hours ago) • 2019-12-04 09:20:18 -0800
Engine • revision 6955b06ced
Tools • Dart 2.7.0

to prevent losing map data (position and zoom) I store it on main screen, and when map widget become visible again - populate stored data to it.
The only one feelable issue - when ios user make swipe screen back - the previous screen (with map) is white, so its confusing little bit for them.


travis fix

Thanks. I was looking at all the other travis yaml's on github and never saw this, so i figured it wasn't neccessary.. but i'm also not sure why the current is failing. :)
thx


better support for pre-release versions in formula class names

Currently if you're using semantic versioning (semver.org) and you promote to a pre-release (e.g. an rc) you get something like this:
1.0.0-rc.1
If I'm making formulas for specific versions, then I'll have a class name of MyPackageATX.Y.Z which corresponds to<EMAIL_ADDRESS>with the dashes removed and each 'word' capitalized.
This is not too difficult to deal with when going from a known package name (e.g. my-package) as you can simply hard code MyPackage into the class name.
However, for versions, this is much more difficult.
e.g. when generating the formula name, I already have to strip any dots or dashes from the version to make it compatible with the class name (e.g. -rc.1 becomes rc1)
However, homebrew expects that the version is also capitalized for each - separated segment.
e.g. if your version is 1.0.0-rc.1-eedwards-1234 then it would expect MyPackageAT100Rc1Eedwards1234
(or in the case of my actual repro, I received: Expected to find class BashUtil00AT000Rc1, but only found: BashUtil00AT000rc1)
As you can imagine, parsing the version to capitalize it just to match what homebrew expects is a lot of extra work and prone to breakage.
So this is a request to instead support a lower-cased class name after the AT or to not mangle the capitalization of the class name's version segment at all, and allow it to pass through as-is.

I believe the code responsible for this is in Library/Homebrew/formulary.rb:
lines 54-60
  def self.class_s(name)
    class_name = name.capitalize
    class_name.gsub!(/[-_.\s]([a-zA-Z0-9])/) { Regexp.last_match(1).upcase }
    class_name.tr!("+", "x")
    class_name.sub!(/(.)@(\d)/, "\\1AT\\2")
    class_name
  end

The first line (name.capitalize) just upper cases the first name part (so<EMAIL_ADDRESS>to<EMAIL_ADDRESS>The next line .upcase is what is upper casing the version:
class_name.gsub!(/[-_.\s]([a-zA-Z0-9])/) { Regexp.last_match(1).upcase }
If I remove the .upcase it will leave just the first part capitalized:
'my-project-0.0@0.0.0-rc.1'.capitalize.gsub!(/[-_.\s]([a-zA-Z0-9])/) { Regexp.last_match(1) }
=> "Myproject00@000rc1"

We'll welcome a PR to improve this but given we don't officially support or recommend creating versioned formulae on specific, prerelease versions this isn't something we'll be working on. Thanks!

@MikeMcQuaid
Thanks for the response, Mike!
I found a workaround which was to leverage the pre-existing ruby code to create the expected class name before generating the formula
Here's a bash script for posterity:
_convert_formula_name_to_ruby_class_name() {
  # 1) formula name

  ruby_script=$(cat <<EOL
name = '${1}'
class_name = name.capitalize
class_name.gsub!(/[-_.\\s]([a-zA-Z0-9])/) { Regexp.last_match(1).upcase }
class_name.tr!("+", "x")
class_name.sub!(/(.)@(\\d)/, "\\\\1AT\\\\2")
puts class_name
EOL
)

  "${ruby_exe}" -e "${ruby_script}"
}

@eedwards-sk:
     Well, the internal implementation details of Formulary.class_s() could always change without notice in the future, so I'm not sure you should rely on them.  You could always call that member function inside of brew irb, though.  I admit that it would be nice if there were an easy way to script this, however.


I'm having an issue accessing collections

When I enter the name of a collection that doesn't exist I get a "[name] doesn't exist screen" and I can get json from pages.  But when I try to get a collection it's throwing this error:

By the way, what I'm trying to do is build a mapbox map using your location addon.  I really appreciate your work.  This task would be much harder without these two addons.

@pastorryanhayden I'm not completely certain what you're describing above. Would you be able to supply some more details to allow me to recreate the issue (page/collection/entry config & example data).
Thanks, I'm glad to hear these addons are useful!

Sorry it’s taken so long to reply.
I’ve got a collection called “Missionaries” that I was planning to cast to JSON using your plugin so I could consume it via a custom Vue map component.
Inside of that collection, I am using the field provided by your location add on to get latitude and longitude by search query.
The problem could be in either repository, but when I use the fetch tag for that collection containing the data from the location addon, I get the error shown above.
It looks like the issue is that it doesn’t turn the float from one of the latitude and longitude values into a string and statamic doesn’t know what to do with that.

Just read your corresponding issue (https://github.com/aryehraber/statamic-location/issues/3#issue-336190468).
Can you confirm it works if you manually add quotes "" around the positive Lat/Long values.

Yes it works, but I also noticed that whether or not it is saved as a string is random.  Sometimes it is, sometimes it isn’t on both negative and positive numbers.

On Jun 27, 2018, at 6:36 AM, Aryeh Raber<EMAIL_ADDRESS>wrote:
Just read your corresponding issue (aryehraber/statamic-location#3 (comment)).
Can you confirm it works if you manually add quotes "" around the positive Lat/Long values.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Alright, this should be enough info for more focused debugging on my end. Will hopefully be able to carve our some time for this in July.
Thanks for the help!

This issue has finally been fixed in v4.1.1.
Apologies for the delay!

@aryehraber I'm not using the fetch plugin but I am using statamic-location and I have a similar problem of random negative long values being saved as strings which Mapbox is getting borked on: https://github.com/aryehraber/statamic-location/issues/3. Any ideas how to fix this in the location plugin?


Update network_dialog.py

Change with Electron-Cash

Hi, the convention used consistently throughout the code is "Electron Cash" not "Electron-Cash".  I recommend you change this pull request to use "Electron Cash" instead..

yes, sorry, i wrote it correctly


Android - "New message" marker distorted (new is cut in half) when marking a message sent after the concierges "This is your first time..." message as unread

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Login to expensify app
Open a new chat with an account the user has no chat history with
Wait for the concierge "This is your first time chatting..." message
Send a message and mark that message as unread
Observe that the new line marker is cut in half, with lower half shown and the other half cutoff

Expected Result:
New message marker should not be s distorted
Actual Result:
New message marker is distorted (cut in half)
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.31-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/b93e55c8-682d-452f-b8f7-000d8a903451
https://github.com/Expensify/App/assets/93399543/79e9e1f9-6079-4bf6-923b-b55339fbc213
Expensify/Expensify Issue URL:
Issue reported by: @sofoniasN
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687561100107119
View all open jobs on GitHub

Dupe of https://github.com/Expensify/App/issues/20451

Nice catch, closing this!


Skippable notes

Note Fields should allow to automatically progress to the next field so that the user does not have to interactive with them.
This would be especially useful for using notes to separate fields in the same group.

Agreed, I would like to use notes to add more information in areas, and it would be nice to have them skipped when going through the form.

Solved by:

https://github.com/charmbracelet/huh/pull/116


redis作为注册时，当提供者或者消费者异常（比如被KILL掉后），admin界面并没有更新其状态，redis数据库中的数据都已经没有了

添加提供者或消费者服务列表可以及时更新；但但提供者或消费者挂掉后却不能及时更新状态

The same as this issue.

Sorry, because this issue was raised very early, we have closed it temporarily. You can verify whether this problem still exists in the latest code of the develop branch. If this problem still exists, please reopen it at any time.


Should Implement Django 1.9 Migrations

python manage.py syncdb is deprecated.
Current Solution is to run python manage.py migrate --run-syncdb
This should be apparent in the documentation page, and I think it may as well be updated.
I would be happy to do this as I don't think it will take much time.

Thanks!
Sent from my iPhone

On Apr 1, 2016, at 5:02 PM, Jay Looney<EMAIL_ADDRESS>wrote:
python manage.py syncdb is deprecated.
Current Solution is to run python manage.py migrate --run-syncdb
This should be apparent in the documentation page, and I think it may as well be updated.
I would be happy to do this as I don't think it will take much time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@paltman Should I update the project requirements from Django 1.4 as well, or is that something we want to remain backwards compatible with? I'm fairly new to the project.

Yes please. 1.8+ only.
You can reference the Travis/tox/setup.py in https://github.com/pinax/pinax-starter-app

Hopefully, that pull request can close this issue, and I can create another which will include the actual newer migrations and testing updates, I figured a quick documentation change that helps get the project working with newer versions of Django should be on it's own, separate from a change that actually updates the software to specifically support the newer versions of Django


Dataloader for each field

Please refer to: https://github.com/graphql/graphql-js/issues/623 first, these issues are linked.
Let's say I'm querying this:
viewer {
  posts(id:1) {
   id
   title
   comments(first: 10) {
    edges {
    node {
      text
       name
        ...
     }
   }
  }
 }
}

What happens on server:

post id is fetched
In "PostType", title is fetched ( through dataloader? )  and then comments
etc..

How would you use dataloader for loading data for each field? Create one instance per field e.g. const title = new Dataloader( ...load posts's title... )?
But in this case title would be cached, and if user changes data - logic should be applied to update each loader separately (based on fields defined in the type that use dalataloader)
And where do you store all the loaders? It seems like a common practice to store them in an object e.g. const loaders = { .. loaders .. }
@leebyron @josephsavona

Relay/graphql boilerplate has code that lightly touches on this topic: https://github.com/codefoundries/UniversalRelayBoilerplate/blob/master/graphql/ObjectManager.js#L162 check it out.
It would be nice if devs could provide some docs on this topic

The answers to this are going to vary widely and depend a lot more on your storage model than your API design. Typically dataloaders correspond to individual "types" of information in storage - that's usually a table in SQL style storage. For most apps, a type in storage corresponds to a type in GraphQL, so I would expect to see a data loader for "Post" and a data loader for "Comment" unless storage was organized in a different way.
It's common to see a collection of loaders passed as part of the "context" variable in GraphQL so they're always available and unique per request.
You can read more about these patterns on the README for this repo on "Using with GraphQL" and "Common Patterns" https://github.com/facebook/dataloader#using-with-graphql

I believe one of the great features of GraphQL is to know exactly which fields to fetch, so would be interest to have a standard way of fetching only the needed information from the database and not the whole document once the user is requesting only a few fields, i believe that is the motivation behind @shakaIsReal issue, am i right @shakaIsReal ?
i'm also trying to figure out a lean way of fetching the smallest amount of data from the database


How to run HlaPipeline.py?

I have installed HlaTools sucessfully. But I don't know how to construct config file and input file. Can you give me an example? Thank you very much!

Attached - this example was for a 6-locus / 12-allele panel consisting of
HLA-A, B, C, DQA, DQB, and DPA, with modest amounts of HLA-H and DQB2
contamination.   The Class I genes were UTR-to-UTR, while the remainder
roughly covered the CDS.  Though fair warning, this software is no longer
officially supported as we are tentatively planning to release LAA v2.0,
which will have built in Class II support and a better consensus model,
next month.
Could you tell me a little bit more about your research goals and
experimental design?  As the lead scientist on, and one of the engineers
responsible for this project I'm curious to see how it is used in the wild.
-Brett
On Mon, Apr 18, 2016 at 12:32 AM, Robin Qi<EMAIL_ADDRESS>wrote:

I have installed HlaTools sucessfully. But I don't know how to construct
config file and input file. Can you give me an example? Thank you very much!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/bnbowman/HlaTools/issues/3

Sorry for my late replay. This project is designed for the analysis of monkey HLA gene. But first we try to test analysis pipeline by using HLA demo data from PacBio devnet. The raw data has been analyzed using SMRT Analysis 2.3.0 with LAA protocol. Then subjected to your in-house script AmpliconAnalysisTyping.py. But the analysis results is different from the Expected HLA Types list on devnet. So, I don't know whether some parameters setting were wrong or not in LAA protocol.

Hmm, interesting.
If I get an FTP account for your team, would you be willing to share your
data with us?
-Brett
On Mon, Apr 25, 2016 at 6:44 PM, Robin Qi<EMAIL_ADDRESS>wrote:

Sorry for my late replay. This project is designed for the analysis of
monkey HLA gene. But first we try to test analysis pipeline by using HLA
demo data from PacBio devnet. The raw data has been analyzed using SMRT
Analysis 2.3.0 with LAA protocol. Then subjected to your in-house script
AmpliconAnalysisTyping.py. But the analysis results is different from the
Expected HLA Types list on devnet. So, I don't know whether some parameters
setting were wrong or not in LAA protocol.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/bnbowman/HlaTools/issues/3#issuecomment-214582541

Though now that I think about it, I don't think any monkey or ape reference
sequences are included in the IMGT database proper, which might explain the
typing difficulties.
-Brett
On Mon, Apr 25, 2016 at 6:44 PM, Robin Qi<EMAIL_ADDRESS>wrote:

Sorry for my late replay. This project is designed for the analysis of
monkey HLA gene. But first we try to test analysis pipeline by using HLA
demo data from PacBio devnet. The raw data has been analyzed using SMRT
Analysis 2.3.0 with LAA protocol. Then subjected to your in-house script
AmpliconAnalysisTyping.py. But the analysis results is different from the
Expected HLA Types list on devnet. So, I don't know whether some parameters
setting were wrong or not in LAA protocol.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/bnbowman/HlaTools/issues/3#issuecomment-214582541

Thank you for your kind remind. I am PacBio Tech Support in China from Gene Company. So, this project is from customer, and we are trying to help them. But I am not sure whether they are willing to share data. By the way, does LAA 2 protocol is able to do HLA phasing analysis directly? Thank you!

Thank you for your kind remind. I am PacBio Tech Support in China from
Gene Company. So, this project is from customer, and we are trying to help
them. But I am not sure whether they are willing to share data.

Fair enough.  HlaTools doesn't support non-human primates because the IMGT
database doesn't.  And the files I would need do not exist in the the (much
smaller) NHP database for non-human primates.
So your best bet is to do the following:

Download all of the nucleotide fasta sequences for the species they
sequences from here:  https://www.ebi.ac.uk/ipd/mhc/nhp/
Run LAA as per usual

NOTE #1:  If they're sequencing non-human primates their primers and
amplicons will likely be different.  Ask the customers what the size of
their primers and expected amplicons are, and set parameters accordingly.
For example, barcoded HLA primers are usually ~50-60bp long and amplify
3.4kb products, so in most cases I use "--ignoreEnds 60 --minLength 3000"
NOTE #2:  If they ran very few samples on each SMRTcell, or only ran 1
sample and didn't use barcodes, they can use more stringent cut-offs for
better quality results.  experiment with higher values of "--minSNR" to see
what gives you the best alignments with the fewest deletion errors.
Default = 4.0, but with sufficient coverage, values of up to ~6.5 or 7 can
generate better results.

Align all of the output sequences against the references you downloaded
with Blasr
Return to your customer the best TWO sequences for each locus and their
alignments

By the way, does LAA 2 protocol is able to do HLA phasing analysis
directly? Thank you!
I don't understand.  Could you explain further?

-Brett
On Mon, Apr 25, 2016 at 6:59 PM, Robin Qi<EMAIL_ADDRESS>wrote:

Thank you for your kind remind. I am PacBio Tech Support in China from
Gene Company. So, this project is from customer, and we are trying to help
them. But I am not sure whether they are willing to share data. By the way,
does LAA 2 protocol is able to do HLA phasing analysis directly? Thank you!
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/bnbowman/HlaTools/issues/3#issuecomment-214584554

Thank you!
I mean the LAA 2 protocol can do alignment with IMGT database and show the HLA type in the output.

I am also curious about the customer's project and we are trying our best to collaborate with them. I will give you feedback if we have any problem or progress. Thank you!

Hi bnbowman,
Sorry to trouble you again. Recently, I got a LAA report from our customer. The experiment contain 10 PCR fragments with 8 HLA genes (two gene with two PCR fragments). But after analysis, they got more than 10 cluster. And in some clusters, more than 2 phases was got. So, I don't know why they got more than 10 cluster, and more than 2 phases. Can you give me some suggestions or any parameter to tunning? Sorry, I did't get the parameter setting for this project. If I can got detailed information, I will share with you. Thanks.
Amplicon Consensus SummarySequence Cluster	Sequence Phase	Length (bp)	Estimated Accuracy	Subreads coverage
Cluster0	Phase0	4,788	99.994%	500
Cluster10	Phase0	7,457	99.994%	196
Cluster11	Phase0	4,877	99.988%	141
Cluster12	Phase0	4,242	99.994%	131
Cluster13	Phase0	7,933	99.457%	126
Cluster14	Phase0	3,720	99.994%	116
Cluster15	Phase0	9,153	99.982%	115
Cluster16	Phase0	4,749	99.992%	115
Cluster17	Phase0	8,427	99.965%	90
Cluster18	Phase0	4,637	99.979%	86
Cluster19	Phase0	4,426	99.984%	71
Cluster1	Phase0	5,463	99.994%	500
Cluster20	Phase0	7,942	99.953%	69
Cluster21	Phase0	4,152	96.537%	62
Cluster22	Phase0	5,482	99.994%	50
Cluster2	Phase0	4,620	99.994%	412
Cluster3	Phase0	4,619	99.994%	424
Cluster4	Phase0	6,222	99.994%	460
Cluster5	Phase0	6,579	99.969%	452
Cluster6	Phase2	5,746	99.98%	133
Cluster6	Phase3	5,741	95.581%	31
Cluster6	Phase4	5,736	99.98%	183
Cluster7	Phase1	7,267	99.98%	246
Cluster8	Phase0	7,120	99.994%	323

Brett, would you send me the example you mentioned?  Thanks.    linwenchao(#->@)yeah.net
wenchao


Feedback on Docs and community sections on Docsy theme

Docs and Community sections completed according to recommendations from the TUF analysis.
I would appreciate your feedback @lukpueh and @chalin
The home page, Resources,  and whole website styling are still in progress. Finishing the content structure and then getting right back to it :)
Thanks

@Dindihub - after you address @lukpueh and my latest comments, I'd suggest that we merge this PR and work incrementally from there.
WDYT @lukpueh?

I have addressed all the comments.  I'm am okay to merge.


Select weeks

Hi there! Is there a way to select weeks instead of single days? I have linked an example below of jQuery UI calendar/datepicker but if someone has a way of doing this with flatpickr I would love to get your advice. If there is anything else you need to make this issue more clear please let me know.
http://jsfiddle.net/manishma/AVZJh/light/
Cheers

Should definitely be possible.
Will get you a fiddle once I think of a nice way to do it

Hello! Have you had the chance to produce a fiddle for this? Would be an awesome to be able to select weeks.

See https://jsfiddle.net/chmln/6g00xy84/2/

@chmln yes this is awesome! I ended up going with another datepicker but this will be super handy moving forward.

@leahthedestroyer Thank you for the idea :+1:

Thanks for the fiddle! Just what I was after.

@chmln Hi, any chance to get the fiddle working again? Looking also for a way to get the user pickup the week of the month...


Update bot_unfollow.py - Quick skip unfollow if out of unfollow for today

Skip unfollow if out of unfollow for today
The change will qickly quit the loop for "unfollow non followers" if out of unfollow for today.

Thanks!


Better UX for counter feedback

Currently the fact that the feedback has been sent is not clear enough

noissue


Types instead of interfaces?

I prefer types to interfaces, could that be an option?
generator typescriptInterfaces {
  provider = "prisma-generator-typescript-interfaces"
  typeOrInterface = "type|interface"
}

-ish? 🤞

Yes should be an easy addition, I'll try to get to that today

Just released v1.3.0 which adds this. The option is named modelType to more closely match other options like enumType. So use it like:
generator typescriptInterfaces {
  provider = "prisma-generator-typescript-interfaces"
  modelType = "type"
}

Thank you again! 🙏🙇


Vim

I am curious if you have used the keyboard layout with vim? If so, did it require a lot of remapping or it turned out it works well?

I am still trying to figure out how best to do this with vim. My own preference would be to remap a bunch of vim keys in a layout-independent way. For instance, (using QWERTY for reference) movement keys could be IJKL or ESDF instead of HJKL, so that they're arranged the same way as movement keys in other programs. Also moving forward a word could just be the key to the right of the right movement key (because it moves right farther) and moving backward a word could be the key to the left of the left movement key (because it moves left farther). This would also be much more user friendly.
But I'm a little scared of remapping too many things and getting too far away from original vim.


configuring of the header interface not working for NbPasswordAuthStrategy

Issue type
I'm submitting a ...  (check one with "x")

[ ] bug report
[X ] feature request
[ X] question about the decisions made in the repository

Issue description
Current behavior:

I want to configure the NbPasswordAuthStrategy like how its configured in the NbEmailPassAuthProvider below to include the header interface but there is no such interface and I am unable to use the  NbPasswordAuthStrategy since its deprecated.
...NbAuthModule.forRoot({
providers: {
email: {
service: NbEmailPassAuthProvider,
config: {
baseEndpoint: 'http://localhost:8181/v1',
delay: 0,
login: {
method: 'post',
endpoint: '/login',
headers: { // add this key
'Content-Type': 'application/json; charset=utf-8',
},
},
token: {
key: 'token',
}
},
},
},
}).providers
Expected behavior:

I want to include the header interface so I can set my API key to it when the authentication is made
find below the current code. If there is any workaround i will be glad
NbPasswordAuthStrategy.setup({
name: 'email',
baseEndpoint: 'http://localhost:8080/api/v2',
// headers: X_DREAMFACTORY_API_KEY,
login: {
// ...
endpoint: '/user/session',
method: 'post',
requireValidToken: true,
redirect: {
success: '/pages',
failure: null,
},
Steps to reproduce:

Related code:

insert short code snippets here

Other information:
npm, node, OS, Browser
<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

Angular, Nebular
<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->

I created Http intercepctor with the header details


Update client.py

To avoid the error DiscourseClientError: param is missing or the value is empty: new_username
Summary of changes
Changing update_username method in client.py to avoid the error DiscourseClientError: param is missing or the value is empty: new_username
Checklist

[ ] Changes represent a discrete update
[ ] Commit messages are meaningful and descriptive
[ ] Changeset does not include any extraneous changes unrelated to the discrete change

See also #39 , the associated bug report.


Can enhance the code by adding linting and prettier. Also possible to add testings, CI

I am interested in contributing to this repo as a part of my coursework and self-practice. I am interested in add linting and prettier to this repo to keep the source code updated. if it's possible, please do assign me this issue. Also I can add testings/CI to the project.
Thank you!

describe your mindustry mod ci

A week ago I learned about CI and implemented t on my personal CLI project (for automated testings when pushed). I wanted to strengthen my knowledge more on CI and testings by implementing it onto other open-source projects. I'll start looking at the code verbosely once you give me permission and assign me. I saw the code briefly and it felt like ill be able to implement the functionality I mentioned. Thank you!

cd TimeControl
npm i -g prettier
nano .git/hooks/format.sh
# enter in the code below and save
chmod +x .git/hooks/format.sh

#!/bin/sh
#formats code on commit
prettier --write .

be warned: the first time you push with formatted code there will be chonky diffs because of all the new whitespace

Ahh, noted. Tahnk you! Ill try my pest to get the best possible results and do a PR for a review. Thanks for the opportunity!

Ahhh, Did a similar issue a few mins back. Sorry for getting things started here. I close this issue now. Thank you for the opportunity and very sorry.


CORS issue - possibly with CDN provider?

I have a static site that I'm hosting with Netlify (http://copy-writer-otter-74032.netlify.com/). I was running it on my local WAMP server without any issues, in any browser. Once I deployed my site to their servers, I got 6 errors, all related to CORS:
Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
I'm bringing this up to say I'm pretty sure its NOT your script, but I'm guessing there might be an issue if you use your script with a CDN provider? I'm guessing this is why it works fine on my local WAMP server, but on a CDN provider, the images are seen as coming from a foreign origin so browsers suddenly freak out and throw the errors I was seeing above?
I have a ticket in with Netlify to see what they can determine and will keep you posted. I looked through the current issues here, and although there are two tickets regarding CORS, neither had my same issue.
Let me know if you have any experience with similar problems.
P

Have you found a solution to this?
I'm having this same problem currently.

There's a PR fixing this.


CMMC L3 is now CMMC L2

CMMC is now on version 2.0. I recommend adding reference to this by saying "This policy initiative was built to CMMC version 1.0 and will be updated in the future". CMMC L2 under CMMC 2.0 is similar to L3 CMMC 1.0 but different control mappings.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 78bbea60-9afb-66e5-987b-f0f6421acb5f
Version Independent ID: 18076443-b6da-5511-277d-ba9d992e7452
Content: Regulatory Compliance details for CMMC Level 3 - Azure Policy
Content Source: articles/governance/policy/samples/cmmc-l3.md
Service: azure-policy
GitHub Login: @timwarner-msft
Microsoft Alias: timwarner

@J227668 Thanks for your comment. We will review the issue and get back to you shortly.

Assigning to content author @timwarner-msft for review.

I just read what was added. Thanks for the update. You have an extra " in the new language.
In addition, if you want to keep "CMMC L2 under CMMC 2.0 is similar to L3 CMMC 1.0 but different control mappings." which might be beneficial you might want to remove "but different control mappings". There are other differences that someone might nitpick.

#please-close


Customizable project structure (platforms)

Use case
Flutter supports multiple platforms, currently 6 (ios, android, windows, linux, macos, web).
A project with all platforms enabled feels unorganized to me. The platform folders are placed "randomly" between project-related folders. In many cases they contain no to minimal code. Thus I don't think they are important enough to be placed top-level.
I'd prefer when all platform-specific sub-projects would be combined into a single platforms folder.

Before top-level view

Proposed

Proposed top-level view

flutter_project
├── .github
├── .vscode
├── android
├── assets
├── docs
├── example
├── ios
├── lib
├── linux
├── macos
├── test
├── driver_test
├── web
├── windows
├── pubspec.yaml
├── pubspec.lock
│

flutter_project
├── .github
├── .vscode
├── assets
├── docs
├── example
├── lib
├── platforms
│   ├── android
│   ├── linux
│   ├── macos
│   ├── web
│   ├── windows
│   ├── macos
├── test
├── test_driver
├── pubspec.yaml
├── pubspec.lock

flutter_project
├── .github
├── .vscode
├── assets
├── docs
├── example
├── lib
├── platforms
├── test
├── test_driver
├── pubspec.yaml
├── pubspec.lock

Custom platform paths
Instead of forcing all existing and future project to migrate to the new structure, it has to be opt-in either hardcoded or customizable
Hardcoded
When the Flutter team decides that a platforms directory is a brilliant idea and adopted as an alternative project layout it could be hardcoded in the flutter_tool supporting the old and new layout.
Customizable
One doesn't fit all. Allowing customizations would allow everyone to place platform folders where it makes sense in their repository. It could be especially for mono repos with very different structures.
Similar to assets, the pubspec.yaml could contain a section to platform folders.
flutter:
  platforms:
    android:
      - platforms/android
    ios:
      - ../../some-ios-project

I don't think it should be customizable, but I think the proposed new folder layout makes sense.

The proposed model seems very clean, I liked it. Can't think, right now, why someone would want to customize it.

It is really so clean 🙌🚀, totally agree!

It's great idea 💡.

Would this introduce any breaking changes to Add 2 App?

Love it

What about having optional platforms?
When we only want to develop something for an exclusive platform!

I will definitely prefer the proposed. It looks clean and well structured.

I think the proposed new layout looks fine, and while I wouldn't personally use a configurable project directory I could definitely understand cases where that would be useful.
The problem is that making this change is non-trivial for a number of reasons:

We would need to indefinitely support both structures, because the changes seems large enough that I don't think any sort of auto-migration would be feasible. I could not ever justify a purely cosmetic breaking change.
We would need to support correctly detecting in the tool at runtime which configuration is used. This is going to be tricky to get 100% correct, and there will be tons of bugs filled where users have gotten their projects into a weird state and can't build.
All of the flutter.dev documentation, tutorial, code labs, blogs posts (google and non-google) will suddenly be out of date. For example: https://flutter.dev/docs/deployment/android. In the worst case, a new user will only stumble upon outdated blog posts and get frustrated and give up on flutter entirely.
All of the IDEs and tools (google and non-google) that may depend on the project structure in a particular way would also need to be updated with the same logic used in flutter_tool. Discovery will be a difficult problem: we don't know what internal tools or personal scripts users have written to work with flutter apps.
Plus, as in all software projects, a bunch of surprises along the way.

Why wouldn't it be possible to auto migrate this?

Some platform build scripts reference ../ as "flutter_root". While this could be migrated (still hard) flutter_tool can't detect all locations where a custom script references /${platform}. Those scripts might be placed outside of the project, like CI/CD scripts where cd android && ./gradlew someTask` is hardcoded and would break.
Detection for 3rd party software will be tricky. Either they have to check two locations (/windows or /platforms/windows) or parse the pubspec.yaml to get the correct directory. To prevent both, flutter_tool should offer a new command printing the path for a platform.
$ flutter platform linux --path
/Users/pascal/project/my_flutter_project/platforms/linux

if project_folder contains "iOS" | "android" | "web" | "linux" | "macOS" | "windows"
move (& simlink?) folders "iOS" | "android" | "web" | "linux" | "macOS" | "windows" to "./platforms"

Copying the folders around would not be hard, no. The problem is that users may have their own infrastructure that refers to parts of the Gradle/Xcode projects directory or additions to these project that make assumptions about the directory they are in relative to the flutter application.  The flutter tool will not be able to detect this, which leaves it up to each developer to fix on their own.

yeah, maybe we could setup symbolic links for transfer time?
On the other side if we get even more platforms it will get worse. unfortunately because the don't start with platform_ or just a _ the platform folders are scattered throughout the project folder.

I can't think of a reason why we can't have breaking folder layout changes on a major flutter release.

@passsy would you consider dropping the customization from this issue? It seems like 90% of the issue is the projects folder.

I believe people will have to change the folder location and it will be easy. After changing the creation tool way of creating things and making everything work when we create platforms in one location. it will be a matter of"

create a folder with the name platforms
move all platform folders to the platform folder

And then the folders will look good, and adding more platforms will be way easier 🚀

Very good idea !

See https://github.com/flutter/flutter/issues/34536#issuecomment-1400512538 for a partial list of the practical downsides of the proposed change. It covers a number of the same things as Jonah's comment above, but has some others as well.

If we ever do this migration, it would make sense to make test structure cleaner:
flutter_project
├── .github
├── .vscode
├── assets
├── docs
├── example
├── lib
├── platforms
│   ├── android
│   ├── linux
│   ├── macos
│   ├── web
│   ├── windows
│   ├── macos
├── test
│   ├── driver
│   ├── integration
│   ├── unit
├── pubspec.yaml
├── pubspec.lock

A temporary solution. 😂😂

A temporary solution. 😂😂
反正要被笑死😄

Will all projects be force-migrated, or will flutter need to support both structures forever?

You could have a grace period with a platform-root:  option in pubspec.yml. It would currently have the value ./ but at some point be migrated to ./platforms, once enough packages use it.

What would the plan be for updating all of our first-party documentation, which refers to the old paths everywhere ?

That's a resource issue, not much we can suggest beside the obvious: the documentation will have to be updated from "the android folder" to the "$platforms-root/android folder", or whatever method is used.

What happens to all of the third-party tooling out there that expects the current structure (e.g., the packages that streamline updating app icons or names across all platforms)?

They can start migrating to $platform-root without impact.
Is this naive ?

@stuartmorgan Your last comment doesn't really apply here (it did apply where it was posted).

How would you propose handling all of that?

The proposal is to have the platform directory inside pubspec and if the information is not present, default to the root directory (like it is today).
  platform-directory: ./platforms

The changes that I can foresee are:

Existing flutter projects are not impacted - by the definition above, they already use the default -
Flutter repositories will have to be refactored to use that information (or fallback to the default). Searching inside the flutter project for "android/" I see 792 results and 70% of them are not relevant. That still be quite a task but that looks pretty  manageable.

Will all projects be force-migrated, or will flutter need to support both structures forever?

None of the above. Existing projects do not have a platform-directory parameter in their pubspec.yaml, so they use the default, which by this proposal, is the same as today.

Will we force-modify everyone's .gitignore files? Because sufficiently old projects have all their platform-specific ignores in a singe top-level .gitignore, so if we don't the git state of old projects will be suddenly wrong (but if we do, we have to auto-modify a file that has potentially arbitrary user changes).

Again this does not really apply to the proposal, I'll skip the rest of the "rebutals / questions"  that were primarily aimed at the other proposal.

What, if anything, will be done about the inconsistency with plugins, which also have all of these same directories, but can't be force-migrated?

This seem a bit out of scope, from an end user standpoint, plugins can stay the same as they are today, unless there is a technical reason it can't.

The proposal is to have the platform directory inside pubspec and when the information is not present, default to the root directory (like it is today).

There are two different proposals in the original issue: "Hardcoded" and "Customizable". Your comments seem to assume the "Customizable" option is what would be implemented. Many duplicates of this issue have proposed the hard-coded version instead.

There are two different proposals in the original issue: "Hardcoded" and "Customizable". Your comments seem to assume the "Customizable" option is what would be implemented.

Yes, the "customizable" option seems to suffer from less drawbacks at first glance at least. Even if it's customizable it can be customizable upon two paths only (only the root folder or the platforms folder). The main advantage is that this is not a breaking changes for existing projects.

This would add a large amount of permanent complexity to the documentation, because every instance of a path that involves a platform would need this caveat.

Yes indeed, I can't think of something better though.
Just to be clear, your stance is that this is not worth it ?


Find new TLS certificate vendor

This morning I'm getting an SSL error for Gratipay.com

I'm running Google Chrome Version 57.0.2987.21 beta (64-bit)

From Wikipedia:

On 24 October 2016, Mozilla announced on its security blog that, following its discovery of the purchase of StartCom by another Certificate Authority called WoSign during its investigation on numerous issues with that CA, and that both have failed to disclose this transaction,[12] Mozilla will stop trusting certificates that are issued after 21 October 2016 starting with Firefox 51.[13] On 1 November 2016, Google announced that it too would stop trusting certificates issued after 21 October 2016 starting with Chrome 56.[14] On 30 November 2016, Apple products will block certificates from WoSign and StartCom root CAs if the "Not Before" date is on or after 1 Dec 2016 00:00:00 GMT/UTC. [15]

Good catch, @clone1018. Here is Google's announcement (3+ months ago).

@whit537 One thing to remember, if migration is the solution CloudFlare does offer SSL

A dedicated SSL certificate on Cloudflare costs 5$ a month.

Re: Cloudflare: https://github.com/gratipay/inside.gratipay.com/issues/957.

Also: https://letsencrypt.org/.

https://blog.heroku.com/announcing_heroku_free_ssl_beta_and_flexible_dyno_hours

I've used LetsEncrypt the it was very nice. I wonder if there's a stigma to using a free SSL provider for a payment website

SNI should be fine from a browser support pov:

Desktop Browsers

Firefox 2 and above
Internet Explorer 7 on Windows Vista and above
Windows Vista or OS X 10.6 with:
Chrome 5.0.342.0
Opera 14
Safari 4

Mobile Browsers

Mobile Safari on iOS 4.0 and above
Android 4.0 (“Ice Cream Sandwich”) and above
Windows Phone 7 and above

I wonder if there's a stigma to using a free SSL provider for a payment website

I think Let's Encrypt has a good reputation. No?

I think the stigma is "You're a payment provider but you can't even afford a real secure cert?". I personally don't have an issue with it but I've heard that before.

Alright, I think the lowest-hanging fruit here is Let's Encrypt + Heroku SSL. We should probably take the $20/mo we'll save at Heroku and donate it to Let's Encrypt.

Would that help address the "can't even afford" issue, @clone1018?

In my opinion, Let's Encrypt is perfectly fine.

We should probably take the $20/mo we'll save at Heroku and donate it to Let's Encrypt.
A dedicated SSL certificate on Cloudflare costs 5$ a month.

Sooooo ... $10/mo donation?

https://certbot.eff.org/docs/using.html#manual

It's a Python app! :-)
/etc/letsencrypt
total 0
drwxr-xr-x    2 root  wheel    68 Feb  9 12:01 ./
drwxr-xr-x  109 root  wheel  3706 Feb  9 12:01 ../
[gratipay] $ certbot certonly
Traceback (most recent call last):
  File "/usr/local/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.11.1', 'console_scripts', 'certbot')()
  File "/usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/certbot/main.py", line 865, in main
    make_or_verify_needed_dirs(config)
  File "/usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/certbot/main.py", line 821, in make_or_verify_needed_dirs
    os.geteuid(), config.strict_permissions)
  File "/usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/certbot/main.py", line 814, in make_or_verify_core_dir
    raise errors.Error(_PERM_ERR_FMT.format(error))
Error: The following error was encountered:
[Errno 13] Permission denied: '/var/lib/letsencrypt'
If running as non-root, set --config-dir, --work-dir, and --logs-dir to writeable paths.

[gratipay] $

Okay, I guess this is the way:
$ mkdir ssl
$ certbot certonly --config-dir=ssl --work-dir=ssl --logs-dir=ssl
Saving debug log to /Users/whit537/personal/gratipay/gratipay.com/ssl/letsencrypt.log

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Place files in webroot directory (webroot)
2: Spin up a temporary webserver (standalone)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
<EMAIL_ADDRESS>
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: a

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: n
Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
to cancel):

P.S. We were only a month away from cert expiration anyway.

Doc to revise: http://inside.gratipay.com/howto/install-an-ssl-certificate.

I'm actually not to sad to be removing "Search 'startssl attempted phone call' in my personal Gmail for history." from our documentation. ☺

Let’s Encrypt CA issues short-lived certificates (90 days). Make sure you renew the certificates at least once in 3 months.

That's gonna be a shift for us.

I guess we should go ahead and drop gittip.org (https://github.com/gratipay/inside.gratipay.com/issues/877) now.

I'm putting together a config file that we can store and reuse.

Renew with each payday :D?

@clone1018 Hehe. :-) Or maybe once a month, as part of payday duties?

Sorting through domain verification ... looks like there are a number of options. DNS would be the easiest, but afaict certbot --manual only supports simpleHttp(?).

A clue! https://github.com/certbot/certbot/issues/4153

Actually, I think HTTP validation will be easier month-to-month than DNS validation. It'll be easier for us to update some config vars at Heroku than to modify DNS.

Can we enforce HTTPS though?

And will we get a single token/authorization for each domain (good), or different for each (bad)?

Because if we get a single pair for each domain, then that's fairly straightforward to store in Heroku config. If it's different for each domain then we may even want to put this in a dashboard page.

This looks to me like it's different for each domain:
(Pdb) pp achalls
[KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token='\x8a\xd4\xab\x05\xd9\x9fnD\x82\xc3\xdb\xef\xbe\xce0\x8b\x8b\xe2\x14\xd1\x8c\xb9\x90\xeaD\xc0\xc7\t(\x10\xfb\x14'), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/JOcG5i0--6DMuLIFSWV7J9GT5BLjVkB_Ah5RwmwlcAE/612995837', error=None), domain=u'gittip.co', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>)),
 KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token='h\xfd\x02\xec\xb5W\xf1\xc0`\xf9w\xb5e\xa1y\xc3\xda\xbaU\xf8@\xc0\x1c\x90\xa5\x01\xf9\xce\xf3\x0b\xa6J'), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/j-_1Q-DrKJT1SN2MWG-oq6SeCWZKFMwllTwipMdFPuE/612995876', error=None), domain=u'gittip.com', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>)),
 KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token="+\x92\xa6\xc1\xcb\x94\xb4\x86l\xc0'$\x85\\\xb6!\x9a\x03\xe2\x91\x1c4T\x98\xa8\x00\xa5\x12\xd2\xaeA\xbd"), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/Z8qfzcntShqbizpfbLQ7vxCEOERZe1OTdCR_jo66AdY/612995903', error=None), domain=u'gratipay.co', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>)),
 KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token='Pmx\x07\x18\x05\xc7tL\x18\xe2\xf6\xa7\x83\x7f\xd5\xda|v\xdd\xd4\xdf\x9cA\x10\xcf\xf5\x8e\xf4\x07\x89"'), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/E9Q4YOVQEHs4xVHu2TUpNQLk3eUf5GJRB7u6v7J74zQ/612995939', error=None), domain=u'gratipay.com', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>)),
 KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token='\x1dM\\Q\xd1\x7f\xc5i\xa5\x9c\x8e\xeaW\xeb\x9cqK[\xb6H\xfc\x9f\xec4_\xd6;B\xdd\x00\x17H'), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/-BvmSDRDf4y9ycDHDjw9521WouRKUY-iiYy-d8fXuz0/612995985', error=None), domain=u'gratipay.net', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>)),
 KeyAuthorizationAnnotatedChallenge(challb=ChallengeBody(chall=HTTP01(token='\x83\xf5\xed\xc4:\x9b\xc6\xca\xe2On\xaa\x0fPw\xb0\xd6\x98\x83U\xe8\xc6\xb3\xc05r\xe5\xb5z\r\xb1>'), status=Status(pending), validated=None, uri=u'https://acme-v01.api.letsencrypt.org/acme/challenge/R1iQHAcF7v5tBAGVF_40AkTOkiQ5wFN6IlpOAn_VPHc/612996018', error=None), domain=u'gratipay.org', account_key=JWKRSA(key=<ComparableRSAKey(<cryptography.hazmat.backends.openssl.rsa._RSAPrivateKey object at 0x104eb28d0>)>))]
(Pdb)

That's at https://github.com/certbot/certbot/blob/v0.11.1/certbot/plugins/manual.py#L112.

Yeah, they're different. Okay!
(Pdb) continue

-------------------------------------------------------------------------------
Make sure your web server displays the following content at
http://gittip.co/.well-known/acme-challenge/itSrBdmfbkSCw9vvvs4wi4viFNGMuZDqRMDHCSgQ-xQ before continuing:

itSrBdmfbkSCw9vvvs4wi4viFNGMuZDqRMDHCSgQ-xQ.xUuLmhhsQVoA1eLx120E-nqe4fo-R277Gs2p71enaDs

If you don't have HTTP server configured, you can run the following
command on the target server (as root):

mkdir -p /tmp/certbot/public_html/.well-known/acme-challenge
cd /tmp/certbot/public_html
printf "%s" itSrBdmfbkSCw9vvvs4wi4viFNGMuZDqRMDHCSgQ-xQ.xUuLmhhsQVoA1eLx120E-nqe4fo-R277Gs2p71enaDs > .well-known/acme-challenge/itSrBdmfbkSCw9vvvs4wi4viFNGMuZDqRMDHCSgQ-xQ
# run only once per server:
$(command -v python2 || command -v python2.7 || command -v python2.6) -c \
"import BaseHTTPServer, SimpleHTTPServer; \
s = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \
s.serve_forever()"
-------------------------------------------------------------------------------
Press Enter to Continue
> /usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/certbot/plugins/manual.py(113)perform()
-> import pdb; pdb.set_trace()
(Pdb) c

-------------------------------------------------------------------------------
Make sure your web server displays the following content at
http://gittip.com/.well-known/acme-challenge/aP0C7LVX8cBg-Xe1ZaF5w9q6VfhAwByQpQH5zvMLpko before continuing:

aP0C7LVX8cBg-Xe1ZaF5w9q6VfhAwByQpQH5zvMLpko.xUuLmhhsQVoA1eLx120E-nqe4fo-R277Gs2p71enaDs

And do challenges survive redirects? Because we canonicalize domains before we hit simplates.

I'm trying to hit the place where it seems like the challenge is issued. But I'm not able to yet.
If it's a requests.get ... I think it might follow redirects? 🙈

This is so skunkerific. 😩

It appears that simple_verify is unused. :-|
$ ack simple_verify acme certbot
acme/challenges.py
213:    def simple_verify(self, chall, domain, account_public_key):
273:    `simple_verify`.
280:    def simple_verify(self, chall, domain, account_public_key, port=None):
379:    `simple_verify`.
452:    def simple_verify(self, chall, domain, account_public_key,

acme/challenges_test.py
106:    def test_simple_verify_failure(self):
109:        verified = self.response.simple_verify(self.chall, "local", public_key)
112:    def test_simple_verify_success(self):
114:        verified = self.response.simple_verify(self.chall, "local", public_key)
178:    def test_simple_verify_bad_key_authorization(self):
180:        self.response.simple_verify(self.chall, "local", key2.public_key())
183:    def test_simple_verify_good_validation(self, mock_get):
186:        self.assertTrue(self.response.simple_verify(
191:    def test_simple_verify_bad_validation(self, mock_get):
193:        self.assertFalse(self.response.simple_verify(
197:    def test_simple_verify_whitespace_validation(self, mock_get):
202:        self.assertTrue(self.response.simple_verify(
207:    def test_simple_verify_connection_error(self, mock_get):
209:        self.assertFalse(self.response.simple_verify(
213:    def test_simple_verify_port(self, mock_get):
214:        self.response.simple_verify(
339:    def test_simple_verify_bad_key_authorization(self):
341:        self.response.simple_verify(self.chall, "local", key2.public_key())
344:    def test_simple_verify(self, mock_verify_cert):
347:            mock.sentinel.verification, self.response.simple_verify(
354:    def test_simple_verify_false_on_probe_error(self, mock_probe_cert):
356:        self.assertFalse(self.response.simple_verify(

acme/standalone_test.py
104:        return resource.response.simple_verify(

Okay, I realized that I had to confirm all six domains before certbot would start actually hitting them. Once I do the result suggests that it does follow redirects, since I'm getting a 404 error instead of a 302.
   Type:   unauthorized
   Detail: Invalid response from
   http://gittip.com/.well-known/acme-challenge/X68UjfeMEpMRcqhcXZbHp49Bjpbs7uTvz1mYWzHedq0:
   "<!DOCTYPE html>
   <html lang="en">
   <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

       <title>404 - Eep! - Gra"

   Domain: gratipay.net
   Type:   unauthorized
   Detail: Invalid response from
   http://gratipay.net/.well-known/acme-challenge/0ob6DqTGWQKU0ZTkC9RH974qo30tg5CrDfdI354BOWQ:
   "<!DOCTYPE html>
   <html lang="en">
   <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

       <title>404 - Eep! - Gra"

   Domain: gratipay.co
   Type:   unauthorized
   Detail: Invalid response from
   http://gratipay.co/.well-known/acme-challenge/7tmbvcPpPCtZ0VzNrZkmqUiM0iXqroVir7b3b4Tb-r8:
   "<!DOCTYPE html>
   <html lang="en">
   <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

       <title>404 - Eep! - Gra"

   Domain: gratipay.com
   Type:   unauthorized
   Detail: Invalid response from
   http://gratipay.com/.well-known/acme-challenge/fY4mMTgma9MeKJfFUo-WSRJZLTpZpyAOI40DShwPgIY:
   "<!DOCTYPE html>
   <html lang="en">
   <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

       <title>404 - Eep! - Gra"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address.
$

Alright, the way the protocol works appears to be that we never directly hit http://gratipay.com/.well-known/acme-challenge/deadbeef from the client. My hunch is that that only ever happens on the server side, with the result communicated back to the client somehow for error reporting.
Press Enter to Continue
Waiting for verification...
> /usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/acme/client.py(643)_send_request()
-> return response
(Pdb) response
<Response [202]>
(Pdb) c
> /usr/local/Cellar/certbot/0.11.1/libexec/lib/python2.7/site-packages/acme/client.py(643)_send_request()
-> return response
(Pdb) response
<Response [200]>
(Pdb) c
Cleaning up challenges
Failed authorization procedure. gratipay.org (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://gratipay.org/.well-known/acme-challenge/6Sm2DpX4zwtR_LiINGmHR2BDGVrkESU6q1xCLEXQzIg: "<!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

    <title>404 - Eep! - Gra"

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: gratipay.org
   Type:   unauthorized
   Detail: Invalid response from
   http://gratipay.org/.well-known/acme-challenge/6Sm2DpX4zwtR_LiINGmHR2BDGVrkESU6q1xCLEXQzIg:
   "<!DOCTYPE html>
   <html lang="en">
   <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">

       <title>404 - Eep! - Gra"

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address.
$

Yeah, here it is:
(Pdb) print response.text
{
  "identifier": {
    "type": "dns",
    "value": "gratipay.org"
  },
  "status": "invalid",
  "expires": "2017-02-16T23:47:57Z",
  "challenges": [
    {
      "type": "tls-sni-01",
      "status": "pending",
      "uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/3VquqWCWTV576rr4jOaIrIWd8ngMd1_EEZZm0AiTZjQ/614621449",
      "token": "l6ac6k4jQQvfdZ8eXTuc712bR1vIBBUWJVpmWApViW4"
    },
    {
      "type": "dns-01",
      "status": "pending",
      "uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/3VquqWCWTV576rr4jOaIrIWd8ngMd1_EEZZm0AiTZjQ/614621450",
      "token": "ni6w5JrayWFjwgyK8SHLJB3KvXjOKKBE4oyY7YBGGgo"
    },
    {
      "type": "http-01",
      "status": "invalid",
      "error": {
        "type": "urn:acme:error:unauthorized",
        "detail": "Invalid response from http://gratipay.org/.well-known/acme-challenge/VQIPCPDWj3qskyK7vVZWu-ROn-P6A7wOAuWzkwMyCoQ: \"\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead prefix=\"og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#\"\u003e\n    \n    \u003ctitle\u003e404 - Eep! - Gra\"",
        "status": 403
      },
      "uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/3VquqWCWTV576rr4jOaIrIWd8ngMd1_EEZZm0AiTZjQ/614621451",
      "token": "VQIPCPDWj3qskyK7vVZWu-ROn-P6A7wOAuWzkwMyCoQ",
      "keyAuthorization": "VQIPCPDWj3qskyK7vVZWu-ROn-P6A7wOAuWzkwMyCoQ.xUuLmhhsQVoA1eLx120E-nqe4fo-R277Gs2p71enaDs",
      "validationRecord": [
        {
          "url": "http://gratipay.org/.well-known/acme-challenge/VQIPCPDWj3qskyK7vVZWu-ROn-P6A7wOAuWzkwMyCoQ",
          "hostname": "gratipay.org",
          "port": "80",
          "addressesResolved": [
            "<IP_ADDRESS>",
            "<IP_ADDRESS>",
            "<IP_ADDRESS>"
          ],
          "addressUsed": "<IP_ADDRESS>"
        },
[snip]

Alright, well, I guess that's enough to go on. The server-side (which I think is open source and written in Go?) appears to follow redirects. 👍

Okay! So let's build an admin capability to set verification token/authorization pairs per domain.

PR in https://github.com/gratipay/gratipay.com/pull/4331 ... will return here in a bit for the certbot side.

We also need to account for grtp.co and assets.gratipay.com.

Moving to https://github.com/gratipay/inside.gratipay.com/pull/1005 for the certbot side. Leaving this open to drive the deploy.

Alright, once https://github.com/gratipay/gratipay.com/pull/4333 is out we should be ready to roll. I think we should go in order of increasing risk:

grtp.co
assets.gratipay.com
gratipay.com

Actually, let's go with https://github.com/gratipay/inside.gratipay.com/pull/1005 ...